Solved

Page after Tomcat login

Posted on 2006-06-28
7
563 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …
The viewer will learn how to implement Singleton Design Pattern in Java.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now