tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Zöhrer @ pronet.at" <robert.zoeh...@pronet.at>
Subject Re: Tomcat MultiHosting problems
Date Mon, 18 Aug 2003 17:41:46 GMT
8/18/2003 2:25 PM John Turner:
> appBase != docBase
> 
> Right now your Context is using the same value for its docBase as your 
> Host is using for its appBase.  Your docBase cannot be your appBase, not 
> to mention that your Context is using a path of "/webapps" which could 
> cause all sorts of weird problems.
> 
> Set appBase = /home/www/vhostxx/html/webapps but then set docBase = 
> "myApp" or something like that (it is automatically relative to the 
> appBase).

Thanks 4 answer John

We don't use appBase = docBasethe and the term "webapps" as path- or
dir-name any longer .. but another mistake was definititly the
ownership of the appBase-dir .. the user "tomcat4" was not in the same
group as the owner of appBase.

drwxr-xr-x    3 web10    ftponly      4096 Aug 18 15:08 appbase_dir

Now the user "tomcat" is in ftponly group too .. and "he" got the dir now.

But now I've some very hard troubles with a test.jsp file, which works
in one host, but in 3 others (with exactly the same seetings) it
doesn't :( .. and I've no idea, why :(

test.jsp:
################
<% for (int i=0; i < 10; i++) { %>
zeile <%= i %> <br>
<% } %>
################

At http://webteam.at:8080/tomcat/test.jsp it works

docBase:

drwxr-xr-x    2 web156   ftponly      4096 Aug 18 16:09 tomcat

and the file:

-rwxrwxrwx    1 web156   ftponly        64 Aug 16 18:32 test.jsp

but at

http://pronet.at:8080/tomcat/test.jsp  I get an error, as seen in the
browser

docBase in this case .. same permissions:

drwxr-xr-x    2 web10    ftponly      4096 Aug 18 18:37 tomcat

File:

-rwxrwxrwx    1 web10    ftponly        64 Aug 18 16:01 test.jsp

There is another host I've tried with different directory names .. but
allways the same error:

AppBase: /home/www/web200/html/servlet

docBase: myapp

http://eko-immobilien.at:8080/myapp/test.jsp

I can't see any differences between all these hosts and context
settings .. but the jsp only works with
http://webteam.at:8080/tomcat/test.jsp.

Another "crazy" thing: At the admin panel I can see further hosts and
contexts, which are NOT in the actual server.xml .. and if I want to
delete them, I get an error.

I'm very despairing  .. so if anybody could help me ..

Many, many Thanks
Robert


server.xml:
############################################
<?xml version='1.0' encoding='utf-8'?>
<Server className="org.apache.catalina.core.StandardServer" debug="9"
port="8005" shutdown="SHUTDOWN">
  <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0" jsr77Names="false"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
  <GlobalNamingResources>
    <Environment name="simpleValue" override="true"
type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be
updated and saved" name="UserDatabase" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
    <Resource description="User database that can be updated and
saved" name="UserDatabase2" scope="Shareable"
type="org.apache.catalina.UserDatabase"/>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
    <ResourceParams name="UserDatabase2">
      <parameter>
        <name>factory</name>
        <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users2.xml</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>
  <Service className="org.apache.catalina.core.StandardService"
debug="9" name="Tomcat-Standalone">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="100" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="0"
disableUploadTimeout="true" enableLookups="true"
maxKeepAliveRequests="100" maxProcessors="75" minProcessors="5"
port="8080"
protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
acceptCount="10" bufferSize="2048" compression="off"
connectionLinger="-1" connectionTimeout="20000" debug="9"
disableUploadTimeout="false" enableLookups="true"
maxKeepAliveRequests="100" maxProcessors="75" minProcessors="5"
port="8009"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"
proxyPort="0" redirectPort="8443" scheme="http" secure="false"
tcpNoDelay="true" useURIValidationHack="false">
      <Factory
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
    </Connector>
    <Engine className="org.apache.catalina.core.StandardEngine"
debug="9" defaultHost="localhost"
mapperClass="org.apache.catalina.core.StandardEngineMapper"
name="Standalone">
      <Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web156/html/public" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="0"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="webteam.at" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web156/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
        </Context>
        <Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="webteam_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
      </Host>
      <Host className="org.apache.catalina.core.StandardHost"
appBase="webapps" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="localhost" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" displayName="Tomcat
Administration Application" docBase="../server/webapps/admin"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/admin" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
          <Logger className="org.apache.catalina.logger.FileLogger"
debug="0" directory="logs" prefix="localhost_admin_log." suffix=".txt"
timestamp="true" verbosity="1"/>
        </Context>
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="true" debug="9" docBase="examples"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/examples" privileged="false" reloadable="true"
swallowOutput="true" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
          <Loader className="org.apache.catalina.loader.WebappLoader"
checkInterval="15" debug="9" delegate="false"
loaderClass="org.apache.catalina.loader.WebappClassLoader"
reloadable="true"/>
          <Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_examples_log."
suffix=".txt" timestamp="true" verbosity="4"/>
          <Manager
className="org.apache.catalina.session.StandardManager"
algorithm="MD5" checkInterval="60" debug="9" duplicates="0"
expiredSessions="0" maxActive="0" maxActiveSessions="-1"
maxInactiveInterval="1800" pathname="SESSIONS.ser"
randomClass="java.security.SecureRandom" rejectedSessions="0"
sessionCounter="0">
          </Manager>
          <Parameter name="context.param.name" override="false"
value="context.param.value"/>
          <Ejb home="com.wombat.empl.EmployeeRecordHome"
name="ejb/EmplRecord" remote="com.wombat.empl.EmployeeRecord"
type="Entity"/>
          <Environment name="maxExemptions" override="true"
type="java.lang.Integer" value="15"/>
          <Resource auth="SERVLET" name="jdbc/EmployeeAppDb"
scope="Shareable" type="javax.sql.DataSource"/>
          <Resource auth="Container" name="mail/Session"
scope="Shareable" type="javax.mail.Session"/>
          <ResourceParams name="jdbc/EmployeeAppDb">
            <parameter>
              <name>password</name>
              <value></value>
            </parameter>
            <parameter>
              <name>url</name>
              <value>jdbc:HypersonicSQL:database</value>
            </parameter>
            <parameter>
              <name>driverClassName</name>
              <value>org.hsql.jdbcDriver</value>
            </parameter>
            <parameter>
              <name>username</name>
              <value>sa</value>
            </parameter>
          </ResourceParams>
          <ResourceParams name="mail/Session">
            <parameter>
              <name>mail.smtp.host</name>
              <value>localhost</value>
            </parameter>
          </ResourceParams>
          <ResourceLink global="simpleValue"
name="linkToGlobalResource" type="java.lang.Integer"/>
        </Context>
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" displayName="Tomcat
Manager Application" docBase="../server/webapps/manager"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/manager" privileged="true" reloadable="false"
swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
          <ResourceLink global="UserDatabase" name="users"
type="org.apache.catalina.UserDatabase"/>
        </Context>
        <Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true" verbosity="4"/>
      </Host>
      <Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web200/html/servlet" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="0"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="eko-immobilien.at" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="0" docBase="myapp"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/myapp" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
        </Context>
      </Host>
      <Host className="org.apache.catalina.core.StandardHost"
appBase="/home/www/web10/html/public" autoDeploy="true"
configClass="org.apache.catalina.startup.ContextConfig"
contextClass="org.apache.catalina.core.StandardContext" debug="9"
deployXML="true"
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve"
liveDeploy="true"
mapperClass="org.apache.catalina.core.StandardHostMapper"
name="pronet.at" unpackWARs="true">
        <Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" debug="9"
docBase="/home/www/web10/html/public/tomcat/"
mapperClass="org.apache.catalina.core.StandardContextMapper"
path="/tomcat" privileged="false" reloadable="false"
swallowOutput="false" useNaming="false"
wrapperClass="org.apache.catalina.core.StandardWrapper">
        </Context>
        <Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="pronet_at_log." suffix=".txt"
timestamp="true" verbosity="4"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger"
debug="9" directory="logs" prefix="catalina_log." suffix=".txt"
timestamp="true" verbosity="4"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase" validate="true"/>
    </Engine>
  </Service>






Mime
View raw message