tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew J. Dick" <ajd...@echoworx.com>
Subject TomCat, taglibs, and servlet mapping
Date Tue, 05 Sep 2000 20:50:30 GMT
Hi all,

  I am trying to get a webapp running on tomcat 3.1 standalone.  I have ripped
out the templating portion of the
java petstore that I had running under weblogic 5.1.  I cannot seem to get the
servlet mapping to trigger to the
appropriate servlet.  First off, the FAQ describes using servlet classes
whereas the example I have maps to a
jsp, so I am not sure if this will make a difference or not.

However the following are the steps I took:

1.) Created a directory under tomcat/webapps called foo.
2.) In tomcat/webapp/foo, I created a WEB-INF directory.
3.) In tomcat/webapp/foo/WEB-INF I placed a web.xml file with the following:
    <web-app>
      <display-name>WebTier</display-name>
      <servlet>
        <servlet-name>webTierEntryPoint</servlet-name>
        <display-name>centralJsp</display-name>
        <jsp-file>Main.jsp</jsp-file>
      </servlet>
      <servlet-mapping>
        <servlet-name>webTierEntryPoint</servlet-name>
        <url-pattern>/control/*</url-pattern>
      </servlet-mapping>
        <welcome-file-list>
        <welcome-file>/index.html</welcome-file>
      </welcome-file-list>
</web-app>

4.) In tomcat/webapp/foo/WEB-INF I placed a directory tlds with the foo.tld
file which holds the template definitions.
5.) In tomcat/webapp/foo I placed all the required jsp files and the
index.html welcome page.
6.) In tomcat/conf/server.xml I added the following line:
      <Context path="/foo" docBase="webapps/foo" debug="1" reloadable="true"
></Context>

This works for weblogic perfectly, with the appropriate change for step 6, .
This afternoon I reinstalled the webapp on weblogic,
made sure it was working, tarred it up and placed it under the appropriate
directory for tomcat and I get the following error:

Error: 500

Location: /foo/control/page1

Internal Servlet Error:

java.lang.NullPointerException:
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:398)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)

        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
        at java.lang.Thread.run(Thread.java:475)

Any ideas, suggestions or similar experiences anyone?

Thanks for any advice.

Andrew



Mime
View raw message