tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Michaels <jor...@viviotech.net>
Subject relative paths in web.xml
Date Tue, 09 Sep 2008 23:47:41 GMT
I'm trying to set up a "init-param" in Tomcat's main web.xml file (the
one in $CATALINA_HOME/conf/web.xml) that looks similar to the following:

<servlet>
        <servlet-name>myServlet</servlet-name>
        <servlet-class>path.to.my.Servlet</servlet-class>
        <init-param>
            <param-name>SOME_XML_FILE</param-name>
            <param-value>./conf/myservlet/myxmlfile.xml</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
</servlet>

and in my $CATALINA_HOME/conf/server.xml file, I have the following:

<Host name="mydomain.net" appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
        <Context path="" docBase="/home/myuser/public_html/" />
</Host>

My XML file is in $CATALINA_HOME/conf/myservlet/myxmlfile.xml, but
whenever I load this up, Tomcat looks for the file under the
/home/myuser/public_html/ folder.

Is there a way that I can tell tomcat to look for a file that's relative
to the $CATALINA_HOME folder instead of my Context Docbase value? It
would be ideal if the Param-Value had no relation to the Context Docbase
value at all.

Is this even possible with Tomcat?

Thanks in advance for any help anyone can offer.

-- 
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Adobe Solution Provider

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message