It looks like they are repackaging Tomcat to use an FHS layout for all the 
directories and files.  You would place webapps in 
/var/lib/apace-tomcat/webapps and secure the directory correspondingly with the 
group as tomcat and the user as root, only giving root write permissions, etc.  
JPackage does this.

These packages usually do a pretty good job at securing tomcat, however 
documentation is usually lacking, so you'd have to read the RPM spec or 
something similar.

The one scary thing about JPackage, for instance, is that they try to shoehorn 
in dependencies.  So say for instance you have a package that was built using 
maven and a dependency with version number 1.2.3.  Well, the curent release of 
JPackage only supports dependency 1.1.1.  Well, they might give that dependency 
a try, and if it seems to work, just use it.

So I think you are best off either packaging Tomcat yourself, or just 
installing it as recommended by others here.

Cheers,
- Ole




David Smith wrote:
You might want to start with asking the Ubuntu packagers about this. A _*normal*_ tomcat installation using the .tar.gz or .zip archive from an Apache mirror is not structured like this. If you can't find any help there, you might want to remove the tomcat packages and just install the .tar.gz distribution from the Apache Tomcat website.

--David

jeusdi wrote:
I've installed Tomcat 5.5 into my Ubuntu + sun-java-1.5, tomcat5.5-webapps
and tomcat5.5-admin.

I'm in a mess because the structure of directories has changed.
For example: *tomcat5.5-webapps package installs webapps into
/usr/share/tomcat5.5-webapps, but tomcat5.5 is in /usr/share/tomcat5.5
(symbolic link to /var/lib/tomcat5.5 !!). I don't know how on earth
tomcat5.5 can find these webapps?
*Other question is when I deploy a single war file correctly, it
is deployed into /var/lib/tomcat5.5/webapps

As you can see bellow (executing a "ls -l"):
/usr/share/tomcat5.5/:
   ... bin
   ... common
   ... conf -> /var/lib/tomcat5.5/conf
   ... doc -> ../doc/tomcat5.5
   ... logs -> /var/lib/tomcat5.5/logs
   ... server
   ... shared -> /var/lib/tomcat5.5/shared
   ... temp -> /var/lib/tomcat5.5/temp
   ... work -> /var/lib/tomcat5.5/work

/var/lib/tomcat5.5/:
   ... conf
   ... logs -> ../../log/tomcat5.5
   ... shared
   ... temp
   ... webapps
   ... work -> ../../cache/tomcat5.5

It implies that exists three webapps directories:
/usr/share/tomcat5.5/server/webapps
   ... admin
   ... host-manager
   ... manager

/usr/share/tomcat5.5-webapps/ (tomcat5.5-webapps ubunti package (apatitude
install tomcat5.5-webapps)
   ... balancer
   ... balancer.xml
   ... jsp-examples
   ... jsp-examples.xml
   ... ROOT
   ... ROOT.xml
   ... servlets-examples
   ... servlets-examples.xml
   ... tomcat-docs
   ... tomcat-docs.xml
   ... webdav
   ... webdav.xml
And as last:  (where tomcat manager has deployed my web application)
/var/lib/tomcat5.5/webapps/
   ... web_gm
   ... web_gm.war

And to make things worse, tomcat manager says that web_gm (my web app) is
running!!! When I want to access it (http://host:8180/web_gm), tomcat says me that "The requested resource (/web_gm/) is not available.", however I can
access to manager, admin, jsp-examples applications.

So, Can you help with this structure of directories?
Where are the config files that links all.

Other question:

Why context.xml is as bellow? It is empty!!!

<!-- The contents of this file will be loaded for each web application -->
<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat
restarts -->
    <!--
    <Manager pathname="" />
    -->

</Context>

Can you help me please?
Note I'm running tomcat using daemon (/etc/init.d/tomcat5.5)

Other question:
in catalina.out there is:

Aug 18, 2007 6:52:27 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive web_gm.war
java.io.FileNotFoundException: /var/lib/tomcat5.5/web_gm/work/tldCache.ser
(No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:316)
        at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4302)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4139)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at
org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:743)
        at
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:737)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:809)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:497)
        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1204)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
        at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
        at
com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
        at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
        at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
        at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
        at
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:213)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
        at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
        at
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:177)
        at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)
Aug 18, 2007 6:52:36 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: /var/lib/tomcat5.5/web_gm/work is
unusable.

Thanks in advanced for all.



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to