In your web.xml file:

  <context-param>
    <param-name>city_name</param-name>
    <param-value>NY</param-value>
  </context-param>



In your JSP

 City:  <%= application.getInitParameter("session-expired-page")%>





On Monday 15 December 2003 02:40 pm, you wrote:
> 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]

Reply via email to