You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo <ag...@agssa.net> on 2006/01/03 13:02:24 UTC

Re: FW: from sumit sanwal==

Sumit wrote:

>  
>
> How could I have my Cocoon app located in a directory other than 
> $TOMCAT_HOME/webapps/cocoon/<my-app>?
>
It is related the tomcat context concept. A hint can be found here: 
http://wiki.apache.org/cocoon/BeginnerDefaultContext

Maybe it does not fully answer your question, but  hope this helps.

Best Regards,

Antonio Gallardo.


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


Re: from sumit sanwal==

Posted by Freek Segers <fr...@nerocmediaware.nl>.
Hi,

This in not a cocoon specific issue, I think.
You can configure Tomcat to use a webapp located somewhere else that  
its webapps directory.
To do this you need to edit Tomcat's server.xml file located in the  
conf directory.
Make sure you have the following Connector enabled (it's enabled by  
default):

     <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
     <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                port="8080" minProcessors="5" maxProcessors="75"
                enableLookups="true" redirectPort="8443"
                acceptCount="100" debug="0" connectionTimeout="20000"
                useURIValidationHack="false"  
disableUploadTimeout="true" />

Then change the default Host to something like:

       <!-- Define the default virtual host -->
       <Host name="localhost" debug="3" appBase="C:/www/myproject/ 
webapp"
        unpackWARs="true" autoDeploy="false" liveDeploy="false">

         <!-- Logger shared by all Contexts related to this virtual  
host.  By
              default (when using FileLogger), log files are created  
in the "logs"
              directory relative to $CATALINA_HOME.  If you wish, you  
can specify
              a different directory with the "directory" attribute.   
Specify either a
              relative (to $CATALINA_HOME) or absolute path to the  
desired
              directory.-->
         <Logger className="org.apache.catalina.logger.FileLogger"
                  directory="C:/www/myproject/logs"  prefix="tomcat."  
suffix=".log"
	        timestamp="true"/>

         <!-- Define properties for each web application.  This is  
only needed
              if you want to set non-default properties, or have web  
application
              document roots in places other than the virtual host's  
appBase
              directory.  -->

         <!-- Default Context -->
         <Context path="" docBase="" debug="3">
           <!-- PersistentManager: Uncomment the section below to  
test Persistent
                Sessions.

                saveOnRestart: If true, all active sessions will be  
saved
                  to the Store when Catalina is shutdown, regardless of
                  other settings. All Sessions found in the Store  
will be
                  loaded on startup. Sessions past their expiration are
                  ignored in both cases.
                maxActiveSessions: If 0 or greater, having too many  
active
                  sessions will result in some being swapped out.  
minIdleSwap
                  limits this. -1 or 0 means unlimited sessions are  
allowed.
                  If it is not possible to swap sessions new sessions  
will
                  be rejected.
                  This avoids thrashing when the site is highly active.
                minIdleSwap: Sessions must be idle for at least this  
long
                  (in seconds) before they will be swapped out due to
                  activity.
                  0 means sessions will almost always be swapped out  
after
                  use - this will be noticeably slow for your users.
                maxIdleSwap: Sessions will be swapped out if idle for  
this
                  long (in seconds). If minIdleSwap is higher, then  
it will
                  override this. This isn't exact: it is checked  
periodically.
                  -1 means sessions won't be swapped out for this  
reason,
                  although they may be swapped out for  
maxActiveSessions.
                  If set to >= 0, guarantees that all sessions found  
in the
                  Store will be loaded on startup.
                maxIdleBackup: Sessions will be backed up (saved to  
the Store,
                  but left in active memory) if idle for this long  
(in seconds),
                  and all sessions found in the Store will be loaded  
on startup.
                  If set to -1 sessions will not be backed up, 0  
means they
                  should be backed up shortly after being used.

                To clear sessions from the Store, set  
maxActiveSessions, maxIdleSwap,
                and minIdleBackup all to -1, saveOnRestart to false,  
then restart
                Catalina.
           -->

           <Manager  
className="org.apache.catalina.session.PersistentManager"
               debug="0"
               saveOnRestart="false"
               maxActiveSessions="-1"
               minIdleSwap="-1"
               maxIdleSwap="-1"
               maxIdleBackup="-1">
                 <Store  
className="org.apache.catalina.session.FileStore"/>
           </Manager>

         </Context>
       </Host>

Now put your cocoon stuff directly inside C:/www/myproject/webapp (no  
subdirectory, so the WEB-INF directory is directly under webapp) and  
you can access your application by calling

http://localhost:8080/

Hope this helps. (I've used Tomcat 4.1 for this. I'm not sure if  
Tomcat 5's config has changed.)

Freek


On 3-jan-2006, at 13:02, Antonio Gallardo wrote:

> Sumit wrote:
>
>>
>> How could I have my Cocoon app located in a directory other than  
>> $TOMCAT_HOME/webapps/cocoon/<my-app>?
>>
> It is related the tomcat context concept. A hint can be found here:  
> http://wiki.apache.org/cocoon/BeginnerDefaultContext
>
> Maybe it does not fully answer your question, but  hope this helps.
>
> Best Regards,
>
> Antonio Gallardo.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org