Hi 

I am having quite a bit of trouble adding a new context in the server.xml
file. I am running Win98 and Tomcat. I have followed the instructions in the
user guide, looked all over the web. Had a look at the mailing list and
tried everything people had to say but still I get the same error. Any ideas
on what else I need to do?????

Your help is appreciated.

The following entry is in server.xml

<Context path="test"
              docbase="c:/web/webapps/test"
              crossContext="false"
              debug="0"
              reloadable="true" >
</Context>

The directory structure is as follows:
<web><webapps><test> then <Web-inf>web.xml<classes>
                                            index.html

The following is my autoexec.bat:
C:\WINDOWS\COMMAND\DOSKEY.COM

SET PATH=.;C:\jdk1.3\bin;C:\jdk1.3\lib\tools.jar;C:\java\myclasses

SET
CLASSPATH=.;C:\jdk1.3\lib\classes.zip;C:\jclasses;C:\jclasses\tests;C:\jclas
ses\examples;C:\jswdk\lib\servlet.jar

SET JAVA_HOME=C:\jdk1.3

SET TOMCAT_HOME=C:\tomcat

The tomcat log has:
2001-03-27 04:18:59 - ContextManager: Adding context Ctx( /examples )
2001-03-27 04:18:59 - Ctx( /test ): Set debug to 9
2001-03-27 04:18:59 - ContextManager: Adding context Ctx( /test )
2001-03-27 04:18:59 - ContextManager: Adding context Ctx( /admin )
2001-03-27 04:18:59 - ContextManager: Adding context Ctx(  )
2001-03-27 04:18:59 - Ctx( /test ): XmlReader - init  /test null
2001-03-27 04:18:59 - Ctx( /test ): Loading -2147483646 jsp
2001-03-27 04:19:00 - PoolTcpConnector: Starting HttpConnectionHandler on
8080
2001-03-27 04:19:00 - PoolTcpConnector: Starting Ajp12ConnectionHandler on
8007


The error in the console where tomcat is running is:
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:217)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:200)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

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:229)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:200)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

If I try to go to the page http://localhost:8080/test the following error is
in the log:
2001-03-27 04:21:12 - Ctx( /test ): Exception in: R( /test +  + null) -
java.lang.NullPointerException
        at org.apache.tomcat.util.FileUtil.isAbsolute(FileUtil.java:289)
        at org.apache.tomcat.core.Context.getAbsolutePath(Context.java:257)
        at org.apache.tomcat.core.Context.getRealPath(Context.java:791)
        at
org.apache.tomcat.request.StaticInterceptor.requestMap(StaticInterceptor.jav
a:191)
        at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:820
)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:77
1)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)

Thanks
Tony

Reply via email to