You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kimberly Nico <ki...@vizdom.com> on 2005/04/27 20:22:39 UTC

getting web.xml configurations from jsp

Hello,

I'm trying to add links to actions within a servlet (non-jsp) on my 
index page, but the url path of the servlet is configurable.  All I can 
rely on is the class name of the servlet.  I could probably do it with 
the old getServlet(String) on the ServletContext, except that method is 
deprecated.

I either need the web.xml configuration object (which could provide me 
the servlet-name of a particular class, which could provide the 
url-pattern for the servlet name), or some equivalent way of searching 
the servlets which are configured in tomcat.

I would prefer to leave my index page as straight jsp, interpreted by 
org.apache.jasper.servlet.JspServlet, and I would prefer not to add any 
more configuration variables, to avoid maintenance if that url pattern 
changes.  I have access to beans affiliated with the other servlet, but 
in order to get the servlet name I would need a Request.  I would also 
prefer to do as little as possible that is tomcat-specific.

Is there a way the jsp can get access to the web.xml configuration of 
another servlet?  (The information it needs is not in the default 
web.xml, but in the webapp/WEB-INF/web.xml.)

Thanks,
Kim Nico
Vizdom, Inc.
www.vizdom.com



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org