You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sed <se...@gmail.com> on 2007/02/15 17:47:06 UTC

getting absolute path to web application and making syntetic ServletRequest & ServletResponse

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