You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert Schmid <ro...@fourthgen.com> on 2000/10/20 21:31:32 UTC

cocoon.properties on windows

I am trying to create a directory which is parallel to the tomcat directory.

The cocoon.properties file is in

D:\Webstuff\tomcat\webapps\ROOT\cocoon.properties

I want to create

D:\xmllab\

In web.xml if I use;

         <servlet>
                 <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
                 <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
                 <init-param>
                         <param-name>properties</param-name>
                         <param-value>cocoon.properties</param-value>
                 </init-param>
         </servlet>

Cocoon requires me to have a second copy of cocoon.properties in D:\xmllab\

However if I try to use a longer path it starts searching under D:\xmllab\ 
instead of TOMCAT_HOME

How should I do this?


Re: cocoon.properties on windows

Posted by Robert Schmid <ro...@fourthgen.com>.
OK, that makes sense.

At 09:02 AM 10/23/2000 -0400, you wrote:
>----- Original Message -----
>From: "Robert Schmid" <ro...@fourthgen.com>
>To: <co...@xml.apache.org>
>Sent: Friday, October 20, 2000 3:52 PM
>Subject: RE: cocoon.properties on windows
>
>
> > Congratulations! you answered my question exactly.  I don't necessarily
> > like the answer, I would prefer a default properties file with option of
> > using several but at least I know how it works.
> >
> > Thanks!
>
>You discovered a *feature* of the Servlet 2.2 specification.  All files
>within a webapp *must* be included in the context's directory.  This is a
>security feature to limit the scope of what a hacker can do to your system.
>It is also a deployment feature to ensure that everything required for
>release is within the context.
>
>If you really want to get around this feature there are two things you
>can do: move to Servlet 2.0 or 2.1 (using JServ), or use symbolic links
>(in Unix).  The symbolic link trick may not work with all servlet engines
>because it is considered poor security to allow the filesystem to look
>outside of the servlet's context.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: cocoon.properties on windows

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Robert Schmid" <ro...@fourthgen.com>
To: <co...@xml.apache.org>
Sent: Friday, October 20, 2000 3:52 PM
Subject: RE: cocoon.properties on windows


> Congratulations! you answered my question exactly.  I don't necessarily 
> like the answer, I would prefer a default properties file with option of 
> using several but at least I know how it works.
> 
> Thanks!

You discovered a *feature* of the Servlet 2.2 specification.  All files
within a webapp *must* be included in the context's directory.  This is a
security feature to limit the scope of what a hacker can do to your system.
It is also a deployment feature to ensure that everything required for
release is within the context.

If you really want to get around this feature there are two things you
can do: move to Servlet 2.0 or 2.1 (using JServ), or use symbolic links
(in Unix).  The symbolic link trick may not work with all servlet engines
because it is considered poor security to allow the filesystem to look
outside of the servlet's context.


RE: cocoon.properties on windows

Posted by Per Kreipke <pe...@onclave.com>.
> Congratulations! you answered my question exactly.

Phew! I was getting gun-shy.

> I don't necessarily
> like the answer, I would prefer a default properties file with option of
> using several but at least I know how it works.

I agree. I thought (and was told) it would work that way, but I can't get it
to. Specifically, I couldn't get absolute paths to work in the web.xml file.
Oh well.

Also, I thought maybe that if missing, a webapp's config would come from the
ROOT webapp by default. Also not happening. Sigh.

Per.

>
> Thanks!
>
> At 03:45 PM 10/20/2000 -0400, you wrote:
> >I run my cocoon exactly the same way: tomcat in one tree and my
> dev webapp
> >somewhere else.
> >
> >So, I'm not sure I'm answering your question exactly (I'm
> batting around 0%
> >on answering the right questions these days) but I've noticed a couple of
> >things with Tomcat on Windows:
> >
> >- I need multiple cocoon.properties, essentially one per WebApp, sorry.
> >- they should be in the WEB-INF folder instead, otherwise
> they're readable
> >via the web (e.g. tomcat serves them right up)
> >
> >So, my setup is the following:
> >
> >WEB.XML:
> >          <servlet>
> >           <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
> >           <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
> >           <init-param>
> >            <param-name>properties</param-name>
> >            <param-value>
> >             WEB-INF/cocoon.properties <!-- Nests the properties file -->
> >            </param-value>
> >           </init-param>
> >          </servlet>
> >
> >          <servlet-mapping>
> >           <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
> >           <url-pattern>*.xml</url-pattern>
> >          </servlet-mapping>
> >
> >
> >I don't understand what you meant by longer paths, so I offer those
> >observations instead :-)
> >
> >Per.
> > > -----Original Message-----
> > > From: Robert Schmid [mailto:robert_schmid@fourthgen.com]
> > > Sent: Friday, October 20, 2000 3:32 PM
> > > To: cocoon-users@xml.apache.org
> > > Subject: cocoon.properties on windows
> > >
> > >
> > >
> > > I am trying to create a directory which is parallel to the tomcat
> > > directory.
> > >
> > > The cocoon.properties file is in
> > >
> > > D:\Webstuff\tomcat\webapps\ROOT\cocoon.properties
> > >
> > > I want to create
> > >
> > > D:\xmllab\
> > >
> > > In web.xml if I use;
> > >
> > >          <servlet>
> > >                  <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
> > >
> <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
> > >                  <init-param>
> > >                          <param-name>properties</param-name>
> > >                          <param-value>cocoon.properties</param-value>
> > >                  </init-param>
> > >          </servlet>
> > >
> > > Cocoon requires me to have a second copy of cocoon.properties in
> > > D:\xmllab\
> > >
> > > However if I try to use a longer path it starts searching under
> > > D:\xmllab\
> > > instead of TOMCAT_HOME
> > >
> > > How should I do this?
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > >
> > >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


RE: cocoon.properties on windows

Posted by Robert Schmid <ro...@fourthgen.com>.
Congratulations! you answered my question exactly.  I don't necessarily 
like the answer, I would prefer a default properties file with option of 
using several but at least I know how it works.

Thanks!

At 03:45 PM 10/20/2000 -0400, you wrote:
>I run my cocoon exactly the same way: tomcat in one tree and my dev webapp
>somewhere else.
>
>So, I'm not sure I'm answering your question exactly (I'm batting around 0%
>on answering the right questions these days) but I've noticed a couple of
>things with Tomcat on Windows:
>
>- I need multiple cocoon.properties, essentially one per WebApp, sorry.
>- they should be in the WEB-INF folder instead, otherwise they're readable
>via the web (e.g. tomcat serves them right up)
>
>So, my setup is the following:
>
>WEB.XML:
>          <servlet>
>           <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
>           <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
>           <init-param>
>            <param-name>properties</param-name>
>            <param-value>
>             WEB-INF/cocoon.properties <!-- Nests the properties file -->
>            </param-value>
>           </init-param>
>          </servlet>
>
>          <servlet-mapping>
>           <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
>           <url-pattern>*.xml</url-pattern>
>          </servlet-mapping>
>
>
>I don't understand what you meant by longer paths, so I offer those
>observations instead :-)
>
>Per.
> > -----Original Message-----
> > From: Robert Schmid [mailto:robert_schmid@fourthgen.com]
> > Sent: Friday, October 20, 2000 3:32 PM
> > To: cocoon-users@xml.apache.org
> > Subject: cocoon.properties on windows
> >
> >
> >
> > I am trying to create a directory which is parallel to the tomcat
> > directory.
> >
> > The cocoon.properties file is in
> >
> > D:\Webstuff\tomcat\webapps\ROOT\cocoon.properties
> >
> > I want to create
> >
> > D:\xmllab\
> >
> > In web.xml if I use;
> >
> >          <servlet>
> >                  <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
> >                  <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
> >                  <init-param>
> >                          <param-name>properties</param-name>
> >                          <param-value>cocoon.properties</param-value>
> >                  </init-param>
> >          </servlet>
> >
> > Cocoon requires me to have a second copy of cocoon.properties in
> > D:\xmllab\
> >
> > However if I try to use a longer path it starts searching under
> > D:\xmllab\
> > instead of TOMCAT_HOME
> >
> > How should I do this?
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: cocoon.properties on windows

Posted by Per Kreipke <pe...@onclave.com>.
I run my cocoon exactly the same way: tomcat in one tree and my dev webapp
somewhere else.

So, I'm not sure I'm answering your question exactly (I'm batting around 0%
on answering the right questions these days) but I've noticed a couple of
things with Tomcat on Windows:

- I need multiple cocoon.properties, essentially one per WebApp, sorry.
- they should be in the WEB-INF folder instead, otherwise they're readable
via the web (e.g. tomcat serves them right up)

So, my setup is the following:

WEB.XML:
         <servlet>
          <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
          <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
          <init-param>
           <param-name>properties</param-name>
           <param-value>
            WEB-INF/cocoon.properties <!-- Nests the properties file -->
           </param-value>
          </init-param>
         </servlet>

         <servlet-mapping>
          <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
          <url-pattern>*.xml</url-pattern>
         </servlet-mapping>


I don't understand what you meant by longer paths, so I offer those
observations instead :-)

Per.
> -----Original Message-----
> From: Robert Schmid [mailto:robert_schmid@fourthgen.com]
> Sent: Friday, October 20, 2000 3:32 PM
> To: cocoon-users@xml.apache.org
> Subject: cocoon.properties on windows
>
>
>
> I am trying to create a directory which is parallel to the tomcat
> directory.
>
> The cocoon.properties file is in
>
> D:\Webstuff\tomcat\webapps\ROOT\cocoon.properties
>
> I want to create
>
> D:\xmllab\
>
> In web.xml if I use;
>
>          <servlet>
>                  <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
>                  <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
>                  <init-param>
>                          <param-name>properties</param-name>
>                          <param-value>cocoon.properties</param-value>
>                  </init-param>
>          </servlet>
>
> Cocoon requires me to have a second copy of cocoon.properties in
> D:\xmllab\
>
> However if I try to use a longer path it starts searching under
> D:\xmllab\
> instead of TOMCAT_HOME
>
> How should I do this?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>