hi why do not u try this statment inyour jsp? getServletContext().getInitParameter("<the parameter name as given in web.xml>"); this statement will just retrieve the value of the parameter name u set in the web.xml. good luck sat ----- Original Message ----- From: "neal cabage" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Tuesday, December 16, 2003 4:40 AM Subject: global.asa -> Web.xml
> > I'm trying to do something as simple as define global constants for my JSP application. In ASP there is a Global.asa file and the closest thing in JSP is of course the web.xml file. I defined a value in my web.xml file and assumed I could retrieve it using the following line: > > String test = (String) new InitialContext().getAttribute("html.basepath"); > > I've done something similar for Datasources that works just fine but for some reason tyring to retrieve a basic String in a similar manner doesn't work. > > Can someone please tell me what I am missing? > > Thanks. > > > > > --------------------------------- > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]