| Author |
how to call action class on application load
|
shah rah
Ranch Hand
Joined: Jan 04, 2007
Posts: 124
|
|
I access my application as http:localhost:8080/miniHR I want Loginpage to show up whenever someone accesses(i will check if user is in session...etc) the application like this http:localhost:8080/miniHR. I access my login as http:localhost:8080/miniHR/login/showlogin.do. How can I call loginaction class automatically when user accesses the application as http:localhost:8080/miniHR. appreciate your reply.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26183
|
|
|
You could subclass the Struts ActionServlet and redirect to the login URL if a session isn't found.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
shah rah
Ranch Hand
Joined: Jan 04, 2007
Posts: 124
|
|
|
can you provide me a sample code. I am not clear on how to implement it.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26183
|
|
|
response.sendRedirect(url)
|
 |
 |
|
|
subject: how to call action class on application load
|
|
|