views:

50

answers:

2

In JEE security, if a user tries to access a secured resource, they are redirected to the login page. After successful login they are redirected to previously requested secure resource.

Is it possible to redirect the user to a specific page, in my case application entry page?

Something equivalent to Spring Security's default-target-url and always-use-default-target

A: 

Create a filter that will look for authenticated resources being accessed.

if it finds send it to login page if user is not authenticated. and set the targetURL in session

from login Servlet check if target URL exist in session then redirect user to that otherwise default targeted url

I hope it is clear

org.life.java