File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Default Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Default "do" for a servlet" Watch "Default "do" for a servlet" New topic
Author

Default "do" for a servlet

Tony Smith
Ranch Hand

Joined: Mar 15, 2005
Posts: 77
Currently to get to our app we have a relatively unfriendly URL and an even more unfriendly network support staff.

Here's a similar overly-long URL:

https://thisIsLong.thatIsTooLong.com/MyAppLong/Welcome.do

I'd be much obliged if anyone could direct me to the right struts config to allow

https://thisIsLong.thatIsTooLong.com/MyAppLong/ or
https://thisIsLong.thatIsTooLong.com/MyAppLong

to be 'forwarded', or otherwise treated exactly like the first URL with the 'Welcome.do' at the end of it.

The URLs are identical. I just want to default the action if it isn't supplied.

Thanks
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
In the MyAppLong directory put a file called index.jsp and put the following contents in the file:

Tony Smith
Ranch Hand

Joined: Mar 15, 2005
Posts: 77
That worked well, thanks!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Default "do" for a servlet