aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "does global forward work for this case ?" Watch "does global forward work for this case ?" New topic
Author

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-mapping>
<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:

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

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


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: does global forward work for this case ?
 
Similar Threads
will it possible to use action.do in normal form tag of html language
How to encode the path attribute in action mapping
can one have multiple global-forward
Global forwards in Struts modules
session expire exception