RE: How to load properties into tomcat 4.0.3?
You can do something like this in your web.xml servlet servlet-namesomename/servlet-name servlet-classsomeclass/servlet-class init-param param-nameparam1/param-name param-valuesomevalue/param-value /init-param /servlet You can then call getServletConfig().getInitParameter(param1) from the init method of the somename servlet. Hope this helps, Subir -Original Message- From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:52 PM To: [EMAIL PROTECTED] Subject: How to load properties into tomcat 4.0.3? Hello, I have a bean that uses the Properties Object. Currently, on each jsp that calls that bean I have to do a bean.setPropsDir() which sets the directory where to find the properties file. Is there a way in server.xml, web.xml or some other way that I can put in a variable that will define the directory where the properites file exists so that the class can access this? Thanks. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to load properties into tomcat 4.0.3?
I am still a bit confused. I do not know what the servlet-name and servlet-class are referring to? The Jsp Page it called TopNav.jsp and the bean is called PictureBrowserBean. I want to have the bean PictureBrowserBean be able to access the extra parameter. In this case, the location of the properties file. Here i my guess at what I would do servlet servlet-nameTopNav/servlet-name servlet-classPictureBrowserBean/servlet-class init-param param-namepropFile/param-name param-value/opt/jakarta-tomcat-4.0.3/webapps/trips-dev/param-value /init-param /servlet Is this correct? I am going to try this, but I am a bit short on time right now. Thanks again for your help. Adam --- Subir Sengupta [EMAIL PROTECTED] wrote: You can do something like this in your web.xml servlet servlet-namesomename/servlet-name servlet-classsomeclass/servlet-class init-param param-nameparam1/param-name param-valuesomevalue/param-value /init-param /servlet You can then call getServletConfig().getInitParameter(param1) from the init method of the somename servlet. Hope this helps, Subir -Original Message- From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:52 PM To: [EMAIL PROTECTED] Subject: How to load properties into tomcat 4.0.3? Hello, I have a bean that uses the Properties Object. Currently, on each jsp that calls that bean I have to do a bean.setPropsDir() which sets the directory where to find the properties file. Is there a way in server.xml, web.xml or some other way that I can put in a variable that will define the directory where the properites file exists so that the class can access this? Thanks. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to load properties into tomcat 4.0.3?
Sorry, I don't know how to do this for a bean. Perhaps someone else who works with beans could help. Sorry about that. -Original Message- From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 9:54 AM To: Tomcat Users List Subject: RE: How to load properties into tomcat 4.0.3? I am still a bit confused. I do not know what the servlet-name and servlet-class are referring to? The Jsp Page it called TopNav.jsp and the bean is called PictureBrowserBean. I want to have the bean PictureBrowserBean be able to access the extra parameter. In this case, the location of the properties file. Here i my guess at what I would do servlet servlet-nameTopNav/servlet-name servlet-classPictureBrowserBean/servlet-class init-param param-namepropFile/param-name param-value/opt/jakarta-tomcat-4.0.3/webapps/trips-dev/param-value /init-param /servlet Is this correct? I am going to try this, but I am a bit short on time right now. Thanks again for your help. Adam --- Subir Sengupta [EMAIL PROTECTED] wrote: You can do something like this in your web.xml servlet servlet-namesomename/servlet-name servlet-classsomeclass/servlet-class init-param param-nameparam1/param-name param-valuesomevalue/param-value /init-param /servlet You can then call getServletConfig().getInitParameter(param1) from the init method of the somename servlet. Hope this helps, Subir -Original Message- From: Adam Pfeiffer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 04, 2002 10:52 PM To: [EMAIL PROTECTED] Subject: How to load properties into tomcat 4.0.3? Hello, I have a bean that uses the Properties Object. Currently, on each jsp that calls that bean I have to do a bean.setPropsDir() which sets the directory where to find the properties file. Is there a way in server.xml, web.xml or some other way that I can put in a variable that will define the directory where the properites file exists so that the class can access this? Thanks. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to load properties into tomcat 4.0.3?
Hello, I have a bean that uses the Properties Object. Currently, on each jsp that calls that bean I have to do a bean.setPropsDir() which sets the directory where to find the properties file. Is there a way in server.xml, web.xml or some other way that I can put in a variable that will define the directory where the properites file exists so that the class can access this? Thanks. __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]