You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael McKibben <mm...@ncube.com> on 2001/07/19 23:41:14 UTC

[C2] writeable workdir inside WEB-INF?

I am new to cocoon and have been playing with the beta1 for several days
now. I am salivating over all the possibilities available with cocoon2!

One issue with the Cocoon Servlet: it seems unsafe to assume that the
WEB-INF/ directory is writeable by the Servlet (or for that matter, anything
inside the Servlet context!). What if the Servlet container serves
everything directly out of the WAR file? It seems a safer approach would be
to take advantage of the ServletContext attribute:
"javax.servlet.context.tempdir" (Servlet Spec, 4.7). This attribute is of
type java.io.File, and can be used as the base directory for the workdir.
This method should work even if the Servlet container is using a more
restrictive java policy.

Just an idea... :)

Regards,

--mike

Re: [C2] writeable workdir inside WEB-INF?

Posted by Berin Loritsch <bl...@apache.org>.
giacomo wrote:
> 
> On Thu, 19 Jul 2001, Michael McKibben wrote:
> 
> > I am new to cocoon and have been playing with the beta1 for several days
> > now. I am salivating over all the possibilities available with cocoon2!
> >
> > One issue with the Cocoon Servlet: it seems unsafe to assume that the
> > WEB-INF/ directory is writeable by the Servlet (or for that matter, anything
> > inside the Servlet context!). What if the Servlet container serves
> > everything directly out of the WAR file? It seems a safer approach would be
> > to take advantage of the ServletContext attribute:
> > "javax.servlet.context.tempdir" (Servlet Spec, 4.7). This attribute is of
> > type java.io.File, and can be used as the base directory for the workdir.
> > This method should work even if the Servlet container is using a more
> > restrictive java policy.
> 
> Yes, I knew this will come sooner or later. If a servlet container is
> not expanding the war file (which Tomcat can do as well IIRC) we have a
> problem with the logger and the hqsqldb.
> 
> What do others think about it? Is the workdie the right place to go for
> such fs activity?

I thought of that--but different vendors place the work directory in
unpredictable places.  For HSQL--it would be better for people to install
it correctly.  Anyhow, it's not a nice subject...

AW: [C2] writeable workdir inside WEB-INF?

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Giacomo Pati wrote:
>
> On Thu, 19 Jul 2001, Michael McKibben wrote:
>
> > I am new to cocoon and have been playing with the beta1 for several days
> > now. I am salivating over all the possibilities available with cocoon2!
> >
> > One issue with the Cocoon Servlet: it seems unsafe to assume that the
> > WEB-INF/ directory is writeable by the Servlet (or for that
> matter, anything
> > inside the Servlet context!). What if the Servlet container serves
> > everything directly out of the WAR file? It seems a safer
> approach would be
> > to take advantage of the ServletContext attribute:
> > "javax.servlet.context.tempdir" (Servlet Spec, 4.7). This
> attribute is of
> > type java.io.File, and can be used as the base directory for
> the workdir.
> > This method should work even if the Servlet container is using a more
> > restrictive java policy.
>
> Yes, I knew this will come sooner or later. If a servlet container is
> not expanding the war file (which Tomcat can do as well IIRC) we have a
> problem with the logger and the hqsqldb.
>
> What do others think about it? Is the workdie the right place to go for
> such fs activity?
>
+1 for the work directory

Carsten

> Giacomo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] writeable workdir inside WEB-INF?

Posted by giacomo <gi...@apache.org>.
On Thu, 19 Jul 2001, Michael McKibben wrote:

> I am new to cocoon and have been playing with the beta1 for several days
> now. I am salivating over all the possibilities available with cocoon2!
>
> One issue with the Cocoon Servlet: it seems unsafe to assume that the
> WEB-INF/ directory is writeable by the Servlet (or for that matter, anything
> inside the Servlet context!). What if the Servlet container serves
> everything directly out of the WAR file? It seems a safer approach would be
> to take advantage of the ServletContext attribute:
> "javax.servlet.context.tempdir" (Servlet Spec, 4.7). This attribute is of
> type java.io.File, and can be used as the base directory for the workdir.
> This method should work even if the Servlet container is using a more
> restrictive java policy.

Yes, I knew this will come sooner or later. If a servlet container is
not expanding the war file (which Tomcat can do as well IIRC) we have a
problem with the logger and the hqsqldb.

What do others think about it? Is the workdie the right place to go for
such fs activity?

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] writeable workdir inside WEB-INF?

Posted by giacomo <gi...@apache.org>.
On Fri, 20 Jul 2001, Donald Ball wrote:

> On Thu, 19 Jul 2001, Michael McKibben wrote:
>
> > I am new to cocoon and have been playing with the beta1 for several days
> > now. I am salivating over all the possibilities available with cocoon2!
> >
> > One issue with the Cocoon Servlet: it seems unsafe to assume that the
> > WEB-INF/ directory is writeable by the Servlet (or for that matter, anything
> > inside the Servlet context!). What if the Servlet container serves
> > everything directly out of the WAR file? It seems a safer approach would be
> > to take advantage of the ServletContext attribute:
> > "javax.servlet.context.tempdir" (Servlet Spec, 4.7). This attribute is of
> > type java.io.File, and can be used as the base directory for the workdir.
> > This method should work even if the Servlet container is using a more
> > restrictive java policy.
>
> what in cocoon2 tries to write to anything in WEB-INF directly? all of the
> dynamic stuff, e.g. images, sitemap class, etc., i've seen goes in a
> working directory provided by the servlet engine...

The log and the hsql database.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] writeable workdir inside WEB-INF?

Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 19 Jul 2001, Michael McKibben wrote:

> I am new to cocoon and have been playing with the beta1 for several days
> now. I am salivating over all the possibilities available with cocoon2!
>
> One issue with the Cocoon Servlet: it seems unsafe to assume that the
> WEB-INF/ directory is writeable by the Servlet (or for that matter, anything
> inside the Servlet context!). What if the Servlet container serves
> everything directly out of the WAR file? It seems a safer approach would be
> to take advantage of the ServletContext attribute:
> "javax.servlet.context.tempdir" (Servlet Spec, 4.7). This attribute is of
> type java.io.File, and can be used as the base directory for the workdir.
> This method should work even if the Servlet container is using a more
> restrictive java policy.

what in cocoon2 tries to write to anything in WEB-INF directly? all of the
dynamic stuff, e.g. images, sitemap class, etc., i've seen goes in a
working directory provided by the servlet engine...

- donald


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org