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

does global forward work for this case ?

Artemesia Lakener
Ranch Hand

Joined: Jun 21, 2005
Posts: 162
A simple question -- I have an /index.jsp which serves as the beginning page for my application. I don't like to use "index.jsp" in the URL, instead I like to use something like "/myapplication" in the URL and it should automatically "forward" to this index.jsp.

I checked "global forward" but I don't know how I can use it for this case. I also checked "action" in the "action-mapping", this seems suits me. Can I simply do

<action path="/myapplication" forward="/index.jsp"/>

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If index.jsp is the starting point for your application and it doesn't require any processing prior to being displayed, you don't really need to define a forward for it at all. Just include the following in your web.xml file:


If you do this, when you specify the server name and context root (e.g. ) the web container will automatically call index.jsp.

Consultant, Sima Solutions
I agree. Here's the link:
subject: does global forward work for this case ?
It's not a secret anymore!