tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Bezdicek" <thomas.bezdi...@engnetworld.com>
Subject AW: ServletContext access question
Date Fri, 03 Aug 2001 08:33:09 GMT
Why not use your own Generic Servlet where you read out parameters
set them global and use it with "extend MyGenericServlet"?
(use in web.xml <load-on-startup>1</load-on-startup> for the 
Generic servlet, so that it get the parameters before any other
servlets start, and dont use at init super.init(ServletConfig)!!)

hope it helps,
tom

> -----Ursprungliche Nachricht-----
> Von: Viktors Krebss [mailto:lopik@delfi.lv]
> Gesendet: Freitag, 3. August 2001 10:21
> An: tomcat-user@jakarta.apache.org
> Betreff: ServletContext access question
> 
> 
> Hello,
> 
> Does anyone know how can I access servlet init parameters form another
> servlet ?
> I mean I can access servlet context (<context-param> ) using
> getServletContext().getContext("/some_servlet")
> but what I need is to get into 
> <servlet>...<init-param>param-I-need-to-know</init-param>...</servlet>
.
> Is it possible at all ?
> Thanks for you help.
> 
> Regards,
> --
> 
> Viktors Krebss, lopik@delfi.lv
> SMC , http://www.smc.lv/
> tel: +371-7777748, mob: +371-9243923, fax: +371-7777701

Mime
View raw message