tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mufaddal Khumri" <MKhu...@allegromedical.com>
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,
Mufaddal.
-----Original Message-----
From: Josh Howe [mailto:josh@sinu.com] 
Sent: Friday, July 29, 2005 1:14 PM
To: tomcat-user@jakarta.apache.org
Subject: setting application variables

 

Hi,

 

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message