Hi,

I have Apache and Tomcat hooked-up using the mod_jk connector. I was
wondering if Tomcat (or a Java Servlet running on Tomcat) is able to
read the DocumentRoot of the Apache web server. I used the following
code in my Servlet:

String doc_root = getServletContext().getRealPath("/");
out.println("doc_root = " + doc_root);

but doc_root comes out as the Tomcat ROOT directory path, and not the
Apache DocumentRoot path. Is what I am looking for even possible? I know
there are ways, but most of these involve hard-coding the path in
Tomcat's config files (virtual host definitions and stuff like that).  I
am trying to avoid hard-coding the path anywhere in Tomcat.

Thanks,

Steve Cromer
[EMAIL PROTECTED]
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to