You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jan Agermose <ja...@agermose.dk> on 2003/04/21 17:46:38 UTC

war deploy and fileresrouces

I have a longrunning webapplication I used to "deploy" simply by having a host/context pointing to disklocation holding the jsp and class files - this was tomcat 4.1.18 - in server.xml:

        <Context path="" docBase="" debug="0" reloadable="false" >
                <Resources className="org.apache.naming.resources.FileDirContext"
                           allowLinking="true"
                           />
        </Context>


now I changing to tomcat 4.1.23 ant using ant, and I would like to package a war file and use ant-tomat-deploy targets/tasks. This works fine except for the images that the application has to display - pointet to by the FileDirContext above. This used to be a symbolic link - putting them in the war-file is not an option as we are talking about > 100Gb of pictures :-D

How can I make things work with a war-file? Or do I have to resort to my old solution - expanding the war-file and defining the context as above?

Jan Agermose

Re: war deploy and fileresrouces

Posted by Jan Agermose <ja...@agermose.dk>.
I should add, I tried ant-deploying using this as a config-file:

<Context path="" debug="0" reloadable="true">
    <Resources className="org.apache.naming.resources.FileDirContext"
        allowLinking="true" docbase="/home/ja/pictures"
        />
</Context>

But then I get the exception bellow - seams the docbase of the resource is
overwritten with the url of the war file?

java.lang.IllegalArgumentException: Document base
/home/ja/devel/PixDB/build/deploy/demo.war does not exist or is not a
readable directory
        at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:19
3)
        at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java
:3342)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3472)


Jan Agermose

----- Original Message -----
From: "Jan Agermose" <ja...@agermose.dk>
To: "'Tomcat Users tomcat" <to...@jakarta.apache.org>
Sent: Monday, April 21, 2003 5:46 PM
Subject: war deploy and fileresrouces


> I have a longrunning webapplication I used to "deploy" simply by having a
host/context pointing to disklocation holding the jsp and class files - this
was tomcat 4.1.18 - in server.xml:
>
>         <Context path="" docBase="" debug="0" reloadable="false" >
>                 <Resources
className="org.apache.naming.resources.FileDirContext"
>                            allowLinking="true"
>                            />
>         </Context>
>
>
> now I changing to tomcat 4.1.23 ant using ant, and I would like to package
a war file and use ant-tomat-deploy targets/tasks. This works fine except
for the images that the application has to display - pointet to by the
FileDirContext above. This used to be a symbolic link - putting them in the
war-file is not an option as we are talking about > 100Gb of pictures :-D
>
> How can I make things work with a war-file? Or do I have to resort to my
old solution - expanding the war-file and defining the context as above?
>
> Jan Agermose
>


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