• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using index.do as default page

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to have 'index.do' as the default page of my application. This is the part of code from my web.xml file
<welcome-file-list>
<welcome-file>index.do</welcome-file>
</welcome-file-list>

Can someone please tell me whether i am doing right.

Thanks
[ February 18, 2006: Message edited by: Joseph Bashir ]
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"index.do" isn't a page in the sense that it isn't an HTML or JSP file. It is a URL that follows the typical pattern used to tell the servlet container to hand off the request to the Struts servlet. I'm pretty sure that this won't work with welcome-file because welcome-file specifies real files.

The typical solution to ensure that a Struts action is the only way into the app is to create an index.jsp file, specify that file in the welcome-file element, and inside the index.jsp file do a redirect to index.do in order to hit your action.
 
reply
    Bookmark Topic Watch Topic
  • New Topic