File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2 Action at Root Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 Action at Root" Watch "Struts2 Action at Root" New topic

Struts2 Action at Root

Lukas Benberg
Ranch Hand

Joined: Jan 03, 2007
Posts: 45
Hi all,
I would like to perform a Struts2 Action when the root of my Webapplication is called. I use Tomcat5 and Struts2. To make it clear, here is what I want:

- The user goes to
- a Struts2 ActionClass is called: reads cookie from user and sets session attribute (i.e. login automatically)
- Struts2 ActionMapping redirects to index.jsp (which reads session attributes)

At present, what happens is:

- The user goes to
- Tomcat redirects to the welcome file: index.jsp
- No action is performed.

So, is there an action name for "root" or something?

Thanks in advance!
I agree. Here's the link:
subject: Struts2 Action at Root
It's not a secret anymore!