Hi. 10May2007 @ 15:14 Luke Vanderfluit thusly spake > Hi. > > I have a jsp page and want to get hold of the absolute path to the context > root /doc base directory. > > > I have my tomcat application deployed under /foo/bar/tomcat/webapps/ROOT/ > > This is the path I want to retrieve programmatically rather than hard code it. > > Is there a way to do this?
Always the same. The moment I post with a question I find the answer. I should post sooner. But no. Err but yes. No definitely not. Yes I should. getServletContext().getRealPath("/") Thanks Yoav Shapira... doh! Kind regards. Luke. > > Thanks. > Kind regards. > Luke Vanderfluit. > -- > ............._.. > .| .| |.|/.|_ . > .|__.|_|.|\.|_ . > :61 421 276 282: > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- ............._.. .| .| |.|/.|_ . .|__.|_|.|\.|_ . :61 421 276 282: --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]