If you go here (Sun's official docs): http://java.sun.com/javaee/5/docs/api/
you'll find it under the ServletContext interface. However, not being one to argue with the obvious, I'm surely going to take your advice, and, in fact, thank you very much for it. Can you post the URL to the Tomcat api docs that you mentioned in your first email? It looks like that maybe I should be using that instead of Sun's documentation, although, after at least a couple of years of doing this, this is the first time I've seen a disconnect between Tomcat and Sun's official documentation. Thank you very much for the info- Allen On Friday 03 August 2007 19:42, David Smith wrote: > Doh! > > Looks like you already know about getServletContextName(). > getContextPath() still doesn't exist. If getContextPath() is what I > think it is, it's only available in ServletRequest. > > --David > > aladdin wrote: > > I have the following two lines of code in a context listener: > > > > ServletContext sc= e.getServletContext(); // e is a ServletContextEvent > > log.write("AppInitializer::ContextInitializer: context name='" + > > sc.getServletContextName() + "'"); > > log.write("AppInitializer::ContextInitializer: context path='" + > > sc.getContextPath() + "'"); > > > > When I try to compile this, I get: > > ./src/utils/AppInitializer.java:33: cannot find symbol > > symbol : method getContextPath() > > location: interface javax.servlet.ServletContext > > log.write("AppInitializer::ContextInitializer: context path='" + > > sc.getContextPath() + "'"); > > > > Why is it not finding the function (and only the function) > > ServletContext.getContextPath()? It's the first time I've used this > > function, but it is typed (I think; maybe I'm going crazy- too much > > programming, ya' know) exactly as it appears in the Sun J2EE > > documentation. > > > > TIA, > > Allen > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]