Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Page after Tomcat login

Posted on 2006-06-28
7
Medium Priority
?
573 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 200 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
A solution for Fortify Path Manipulation.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

885 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