tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: RE : web.xml
Date Mon, 06 Dec 2004 14:48:23 GMT
well if request is available (either in a JSP or a Servlet) then he may as well use application.getInitParameter("CONFIGFILE"),
or in a Servlt getServletContext().getInitParameter .. no point going via the session. He
should not be passing J2EE objects down into his business logic either.

> -----Original Message-----
> From: VAN DER MARLIERE FREDERIC
> [mailto:frederic.van_der_marliere@cdn.fr]
> Sent: 06 December 2004 14:44
> To: Andreas Andersson; tomcat-user@jakarta.apache.org
> Subject: RE : web.xml
> 
> 
> Hi Andreas.
> 
> You can get you parameter with: 
> 
>   
> 'request.getSession().getServletContext().getInitParameter("CO
> NFIGFILE")'
> 
> It first gets a reference on your application context and 
> then gets the
> parameter you wrote in <context-param>...</context-param>
> 
> Fred.
> 
> -----Message d'origine-----
> De : Andreas Andersson [mailto:andreas@travelstart.se] 
> Envoyé : lundi 6 décembre 2004 13:57
> À : tomcat-user@jakarta.apache.org
> Objet : web.xml
> 
> 
> Hi all!
> 
> I'm wondering how to get the values of the context-param 
> CONFIGFILE (see 
> below) into my normal class.
> 
> <web-app>
>    <context-param>
>      <param-name>CONFIGFILE</param-name>
>      <param-value>c:\some\path\config.xml</param-value>
>    </context-param>
> </web-app>
> 
> -- 
> Andreas Andersson
> IT Dept.
> Travelstart Nordic
> andreas@travelstart.se
> http://www.travelstart.se
> 
> 
> ----------------------------------------------------
> Ce message et toutes les pieces jointes (ci-apres le 
> "message") sont confidentiels et etablis a l'intention 
> exclusive de ses destinataires.
> Toute utilisation ou diffusion non autorisee est 
> interdite.Tout message electronique est susceptible d'alteration.
> Le CREDIT DU NORD et ses filiales declinent toute 
> responsabilite au titre de ce message s'il a ete altere, 
> deforme ou falsifie.
> This message and any attachments ( the "message") are 
> confidential and intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.E-mails 
> are susceptible to alteration.
> Neither CREDIT DU NORD nor any of its subsidiaries or 
> affiliates shall be liable for the message if altered, 
> changed or falsified.
> ----------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
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