tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ellwood, Pifen" <pellw...@cms.cendant.com>
Subject RE: Changing root webapp-Can you take a look of my server.xml fil e?
Date Wed, 22 Nov 2000 16:05:06 GMT
Sorry to butt in, but I have the same issue and not been able to solve it
for several days.
It is driving my crazy

I'm using Tomcat3.2 bata7, Apache 1.3, ant 1.2 
I set up my web application in myhome/webapps/myapp created by build.xml.
I update the tomcat.conf file in the TOMCAT_HOME/conf add alias and
directory
as in the attached file 
I update the server.xml  file in the TOMCAT_HOME/conf add context path as
the documentation stated
   <Context path = "/myapp"
                  docbase="webapps/myapp"
                  debug="9"
                  reloadable="true">
   </Context>
      
When I start Tomcat, I got the error message:


Starting tomcat. Check logs/tomcat.log for error messages
2000-11-22 10:53:17 - ContextManager: Adding context Ctx(  )
2000-11-22 10:53:17 - ContextManager: Adding context Ctx( /test )
2000-11-22 10:53:18 - Ctx( /myapp ): XmlReader - init  /myapp null
2000-11-22 10:53:18 - Ctx( /myapp ): Loading -2147483646 jsp
Error generating automatic apache configuration
java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.tomcat.util.FileUtil.isAbsolute(FileUtil.java:289)
        at
org.apache.tomcat.task.ApacheConfig.execute(ApacheConfig.java:219)
        at
org.apache.tomcat.startup.Tomcat.generateServerConfig(Tomcat.java:219
)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
Error generating automatic Netscape configuration
java.lang.NullPointerException

java.lang.NullPointerException
        at org.apache.tomcat.util.FileUtil.isAbsolute(FileUtil.java:289)
        at org.apache.tomcat.task.NSConfig.execute(NSConfig.java:136)
        at
org.apache.tomcat.startup.Tomcat.generateServerConfig(Tomcat.java:231
)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:237)
2000-11-22 10:53:19 - PoolTcpConnector: Starting HttpConnectionHandler on
8080
2000-11-22 10:53:19 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
8007


Could you tell me what did I miss??

Thanks a lot

PiFen Ellwood


-----Original Message-----
From: Julio Serje (@canada.com) [mailto:jserje@home.com]
Sent: Tuesday, November 21, 2000 9:02 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: Changing root webapp


You may define your root app in a different location than webapps. Just move
it to another directory and give the absolute path in your server.xml:


         <Context path=""
                  docBase="/absolutepath/main"
                  debug="1"
                  reloadable="true"
                  trusted="true" >
         </Context>

I have a setup like this and works fine.

Julio


----- Original Message -----
From: Richard Evans <rde@webtrak.co.uk>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, November 21, 2000 11:22 AM
Subject: Changing root webapp


> In the default tomcat build there is a ROOT webapp which maps to /.  Now I
> would like to map the pages and servlets in ROOT to some other path and
have a
> webapp of my own which handles /.
>
> I tried something like this in server.xml:
>
>         <Context path="/root"
>                  docBase="webapps/ROOT"
>                  debug="0"
>                  reloadable="true"
>                  trusted="true" >
>         </Context>
>
> <!-- Main applications and servlets -->
>
>         <Context path=""
>                  docBase="webapps/main"
>                  debug="1"
>                  reloadable="true"
>                  trusted="true" >
>         </Context>
>
> In other words, /root will map to the tomcat home page, etc.  It works
fine
> except of course my main web app is loaded twice: once when server.xml is
read
> and once at autosetup time.  AutoSetup scans the webapps directory, finds
> "main" and because there isn't a /main context, loads the context again.
This
> means that my load-on-startup servlets get loaded twice.
>
> Is there a better way of doing this?
>
> Richard


Mime
View raw message