On Mon, 13 Jan 2003, Craig S. Connell wrote:

> Date: Mon, 13 Jan 2003 13:12:41 -0500
> From: Craig S. Connell <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: setting unpackWars=false
>
> This afternoon I began to look at running some of our WAR files in
> Tomcat (4.0.4) without unpacking them.  I set the unpackWars=false in
> server.xml.
>
> This seems pretty straightforward, although there appear to be some
> issues.  None of the application that I try to run this way work now.
>   These applications do work if I set unpackWars=true.
>
> An example is Cocoon.  When I try and run Cocoon without unpacking it, I
> get some errors in Cocoon where it appears unable to find some of the
> classes it requires.  If I look into the work directory, I find that
> some files have been unpacked there (as I expected), and notice that the
> classes in question actually do exist in a JAR in the WEB_INF\lib
> directory (as expected).  So, in Cocoon's case, I am unable to compile
> the sitemap_xmap.java file.
>
> So my question is .... what am I missing?  Are there some other
> configurable options that I should be aware of?  What do I need to do to
> make an application run without unpacking the WAR file?  I also noticed
> that the contents of the work directory are different depending on
> whether or not unpackWars is true of false.  I could see that being
> expected behavior - but should it be?
>

The webapp itself has to be written so that it can work inside a WAR.

Most commonly, that means using ServletContext.getResource() or
ServletContext.getResourceAsStream() instead of file i/o in order to read
webapp resources.  You also cannot write to resources in a WAR (which I
suspect Cocoon probably tries to do).

> Thanks for any help.
>
> Craig S. Connell
>

Craig


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

Reply via email to