You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Villalba Arias, Fredy [BILBOMATICA]" <fv...@mailext.com> on 2004/02/12 16:48:39 UTC

[OT] Servlet Name at runtime

Hi to you all,

 

An OT question (if it were not urgent, I wouldn’t post it)… hope not to get “fired” for this.   :-)

 

Given a web application with two Servlets classA and classB: how can I determine classB’s servlet-name (as specified inside the web.xml file) from classA’s doGet method?

 

I already know about ServletConfig.getServletName(). What I haven’t been able to determine is how to obtain an instance (the right one) of classB in order to do that (creating one “by hand” one work since it would be null.

 

Will appreciate if you can help me out with this.

 

Thanx,

Freddy.

 

P.D.: don’t want to use the deprecated methods there used to be in previous APIs.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003