Re: Getting servlet context path without a servlet request.

2006-05-22 Thread Stuart Wood
Thanks, Tim. I'd just found a page on the 2.5 spec saying it was on its way. I think I'm going to just use ServletContext.getServletContextName() and just remember to keep them in step myself - I guess it's only an issue during development anyway, but it seemed like such an elegant solution. Ch

Re: Getting servlet context path without a servlet request.

2006-05-22 Thread Tim Funk
Your on the right track - the servlet 2.5 spec fixes this (but tomcat 6 isn't out yet). If I were in this predicament - I'd use a ServletContext init parameter. They can be overridden in the declaration. -Tim Stuart Wood wrote: I have a web application running under Tomcat 5.0, and I need

Getting servlet context path without a servlet request.

2006-05-22 Thread Stuart Wood
I have a web application running under Tomcat 5.0, and I need to write some output to a file. This app doesn't have its servlet context hardcoded in anywhere, so I can deploy it with any name and not worry about missing some random bit of code anywhere, and I often deploy it with different names s