tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sed <sed.n...@gmail.com>
Subject getting absolute path to web application and making syntetic ServletRequest & ServletResponse
Date Thu, 15 Feb 2007 16:47:06 GMT
Hi,

Is it possible to get path to web-application of the servlet in
servlet's init method? The path should be in form
http://[host]:8080/[context]/.
When I invoke context.getResource("/"), I have "jndi:/localhost/mat/",
but I need "http://localhost:8080/mat/".

In fact I need make http request from servlet's init method to one
page of the same web application, but I don't know there the absolute
path to it.

Maybe it is possible to make this request using
RequestDispatcher.include(ServletRequest, ServletResponse), but how
can I create synthetic request and response from passing to include
method?

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message