struts application startup

V

vk33612

Hi,
Where is the startup code for struts based application placed ? I am
looking for something similar to "main" method where I can read
application config properties, set application scope attributes etc.

TIA
 
W

Wendy Smoak

vk33612 said:
Where is the startup code for struts based application placed ? I am
looking for something similar to "main" method where I can read
application config properties, set application scope attributes etc.

Application config will probably be in struts-config.xml and/or web.xml. It
could be in other places... depends on who wrote the app. ;)

You may find, for example, a ServletContextListener configured in web.xml,
that the Servlet container will run when the webapp starts. I use one of
those to put a bunch of Maps in application scope for use in drop-down
menus. (Some people use a Servlet configured to load on startup.)

Are you trying to get a handle on an existing Struts webapp (that you didn't
write)? You may find Struts Console useful:
http://www.jamesholmes.com/struts/console/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top