"Jordan Michaels" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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?
>
This feature is specific to Tomcat, but yes you can do it. You would use:
<param-value>${catalina.home}/conf/myservlet/myxmlfile.xml</param-value>
When Tomcat parses your web.xml file, it will substitute the value for the
System property catalina.home. Of course, this works for any System
property.
> 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: [email protected]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]