• 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

call Action when a JSP is called

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When users request for index.jsp, I want a SetUpAction class to be called.
With a servlet, I would edit the web.xml to get this done.
With a struts framework, I am not sure how I should edit my struts-config.xml.
At present, I have a link on my index.jsp.

And in my struts-config.xml:

Now, I want to bypass the index.jsp and arrive at the SetupAction class directly.
How can I do this?
Thanks
-- $uDhA
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
You can try doing something like this:
In your index.jsp use this line:

And in your struts-config.xml:

Your action should be called immediately when you type in index.jsp.
 
Sudha Joish
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Works great.
Thanks for the imm response.
-- $uDhA
 
reply
    Bookmark Topic Watch Topic
  • New Topic