tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Øyvind Hvamstad <oyv...@hvamstad.net>
Subject Re: Relative paths in servlets?
Date Mon, 06 Jan 2003 15:30:26 GMT
On Mon, 2003-01-06 at 16:31, Jacob Kjome wrote:

> Assuming the .war file is in CATALINA_HOME/webapps
> <Context path="/mypath" docBase="myWarArchive.war"/>
> 
> Make sure to stop tomcat before you put the .war file into webapps.  Add 
> the above to your server.xml or a context configuration file (like 
> admin.xml or manager.xml are set up).  Then put the .war file into 
> webapps.  Now start Tomcat.  Then, try to access a servlet which uses 
> getRealPath("/").  Check the value.  I guarantee it is null.
> 


I am using the ant installTask, I was somehow confused to believe that
it used .war, but that was a mistake. No need to be agrevated.

<snip from="build.xml">
  <target name="install"
          depends="dist"
	  description="Install application to servlet container">

    <install url="${manager.url}"
	     username="${manager.username}"
	     password="${manager.password}"
	     path="${app.path}"
             <!-- THIS PROBABLY THREW ME OFF -->
             war="file://${build.home}"/>

  </target>
</snip>

> Jake

Thanks

Øyvind


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message