• 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

Setting an Action as welcome page(/action)

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want a welcome action to be performed when the user accesses my web application. The welcome action would do some database look-up and render the welcome page (with data retrieved from DB).

This is how I achieve this now. I have designated an index.html in my web.xml as the welcome page as follows:


I then created webapps/<app-name>/index.html. This html auto-posts the action (that I want executed on welcome) upon load (using javascript) as follows


So index.html gets loaded first on the browser. Upon load, index.html does an auto-post for the logon action.
But this creates an element in the browser�s history. So I tried referencing the action directly in web.xml as follows


But even now, index.html gets loaded. I guess tomcat first looks out for file named webapps/<app-name>/logon. It obviously is not there and hence proceeds to the next welcome page.

How can I successfully reference an action in my web.xml?

I use Tomcat 4.1 (if it makes any difference).

TIA,
Babu
reply
    Bookmark Topic Watch Topic
  • New Topic