Link to home
Start Free TrialLog in
Avatar of CIPL-Senthil
CIPL-Senthil

asked on

How to check user session availability in Struts application

Dear Experts,

Our application is based on Struts and JSP. My problem is if somehow if the user is getting the URL of any page in our application and accessing that page directly with out login, actually it should not display the requested page. instead it should take the user to the login page. The easiest way is to check for the user session in each and every page. But i want to centralise this at one particular point.

Can i know the solution if there is any way to do in this manner.

Regards,
Malathi
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

you can implement this using filters;

map all jsps to servlet filter;then if anybody accessing any jsp every jsp request will go into this filter.in the filter you can put only login.jsp
ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial