Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting an Action as welcome page(/action)

Babu Subbu
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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).

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic