tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wall" <d.w...@computer.org>
Subject Re: SOLVED: How to get the context path for a web application?
Date Tue, 10 Aug 2004 17:46:50 GMT
> No, and an archive search would reveal past discussions around this
> issue (though none recently).   Webapps are supposed to be independent
> of their server configuration including with regards to context path,
> and so the Servlet Spec actively discourages you from doing webapp
> initialization or configuration based on such data.  A lot of people
> debated for a long time what does and doesn't go into the
> ServletContext/ServletConfig objects as opposed to Request/Response
> objects.

True and it's mostly not a big issue.  However, is it possible for a
ServletContext to reference one context path and the Request objects to have
a different one?  Most webapps only operate under a single context path
(don't they?), so having it at initialization would be nice too.  Oh well...
With the path, I could build URLs for email and other logging info at
initialization that cannot be done dynamically without knowing the
host/port/contextpath.

David


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


Mime
View raw message