tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mufaddal Khumri" <>
Subject RE: setting application variables
Date Fri, 29 Jul 2005 20:15:41 GMT
You could have a ContextListener for your web application. You could
then read the properties from your property file and put them in the
application context so that all your JSP pages have access to them.

In order to implement a ContextListener you need to write a class that
implements the ServletContextListener interface.

You will have to make an entry in your web.xml about the same.

Hope this helps,
-----Original Message-----
From: Josh Howe [] 
Sent: Friday, July 29, 2005 1:14 PM
Subject: setting application variables




I'm very new to Tomcat and JSP. Can anybody tell me how I can initialize
some application variables from a file so that they are available to all
of the asp pages in my application as soon as it starts? Thanks! 

This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message