This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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 ?
Similar Threads
Global forwards in Struts modules
will it possible to use in normal form tag of html language
How to encode the path attribute in action mapping
can one have multiple global-forward
session expire exception