Solved

Page after Tomcat login

Posted on 2006-06-28
7
570 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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 …

622 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