tomcat-users mailing list archives

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

Is it possible to get path to web-application of the servlet in
servlet's init method? The path should be in form
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

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message