Hi Ben,

   I'm really new to Tomcat/Jsp. Would you be able to send me a sample
web.xml as what should I include if i want to use it from my Jsp. That would
be a great help..

Thanks in advance,

Regards,
Divya


-----Original Message-----
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: 15 December 2003 23:31
To: Tomcat Users List
Subject: Re: global.asa -> Web.xml


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