Solved

Page after Tomcat login

Posted on 2006-06-28
7
568 Views
Last Modified: 2013-11-24
Hi all

I make use the Tomcat Form Login
- username = j_username
- password = j_password
- form action = j_security_check

I know that login failure page can be managed by web.xml login-module
But ,how can I manage the login success page configuration?

Thanks/Glogin
0
Comment
Question by:glogin
  • 4
  • 3
7 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 17007448
The default is the index.jsp/index.html etc. Tomcat should know which resource you tried to access and will redirect you there. For example if you have a /secure/mypage.jsp and you try to access this page without first logging in then you should see the login authentication page. Once you successfully log in Tomcat should reidrect you to the /secure/mypage.jsp.
0
 
LVL 3

Accepted Solution

by:
ss_p earned 50 total points
ID: 17009046
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Your realm ....</realm-name>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error.jsp or whatever error page </form-error-page>
</form-login-config>
</login-config>


where login.html will be be sucess page

0
 
LVL 35

Expert Comment

by:girionis
ID: 17009084
> where login.html will be be sucess page

I think you mean login.html will be the page with the login form. Or not?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:ss_p
ID: 17009288
yes

web.xml clearly statest that loginform is contained in login.html
0
 
LVL 3

Expert Comment

by:ss_p
ID: 17009498
hi

it need not be a html with the form

<login-config>
<auth-method>FORM</auth-method>
<realm-name>Your realm ....</realm-name>
<form-login-config>
<form-login-page>/loginServlet</form-login-page>
<form-error-page>/loginServlet?STATUS=ERROR</form-error-page>
</form-login-config>
</login-config>

in LoginServlet have attribute STATUS and LOGIN_TYPE

you can get the parameter

get the STATUS and LOGIN_TYPE fromt he request parameter.

Based on this you can control the flow.

<form-login-page>/loginServlet</form-login-page>

is actually a sucess url
0
 
LVL 35

Expert Comment

by:girionis
ID: 17009529
It can be anything. If it is a servlet or another JSP page the flow can be directed into another page after successful login.
0
 
LVL 3

Expert Comment

by:ss_p
ID: 17016277
hi Glogin

did you find this information useful

Thanks/SSP
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question