You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by John Plate <pl...@infotek.dk> on 2003/03/07 14:14:24 UTC

Newbie: Starting problem

Hi 

I'm new to tomcat. I can see examples etc just fine. I've read all
included docs as far as I aware.

I have a small and simple setup. 1 small .jsp file and 1 servlet. I
can see .jsp file when invoked by the browser. When that .jsp file
calls the servlet, which is reported "not found" by tomcat.

I can see in the log files that the .jsp files are recognized by
tomcat - it is copied to the working area. But not the servlet. I've
seen the Manager overview and there is no servlets registered.

Here is my web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
  <servlet>
     <servlet-name>login</servlet-name>
     <servlet-class>chapter2.login</servlet-class>
     <load-on-startup>7</load-on-startup>
  </servlet>
  <servlet-mapping>
     <servlet-name>login</servlet-name>
     <url-pattern>/chapter2.login</url-pattern>
   </servlet-mapping>
</web-app>

I've inserted this in conf/server.xml:
<Context path="/apress" docBase="apress" debug="9" reloadable="true">
</Context>

I have these files:
./WEB-INF
./WEB-INF/classes
./WEB-INF/classes/chapter2
./WEB-INF/classes/chapter2/HelloTag.java
./WEB-INF/classes/chapter2/login.class
./WEB-INF/classes/chapter2/login.java
./WEB-INF/lib
./WEB-INF/web.xml
./login.jsp
./welcome.jsp
./images
./images/monitor2.gif

Can anybody help?

Thanks in advance
-- 
John Plate 

-- 
John Plate 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Newbie: Starting problem

Posted by Manolis Mavrikis <ma...@maths.ed.ac.uk>.
John,

  from a quick look I think (I am not sure if there are any differences in
tomcat versions) it may have to do with your mapping. How do you call the
servlet from the jsp ? what url do you use ?

> Hi
>
> I'm new to tomcat. I can see examples etc just fine. I've read all
> included docs as far as I aware.
>
> I have a small and simple setup. 1 small .jsp file and 1 servlet. I
> can see .jsp file when invoked by the browser. When that .jsp file
> calls the servlet, which is reported "not found" by tomcat.
>
> I can see in the log files that the .jsp files are recognized by
> tomcat - it is copied to the working area. But not the servlet. I've
> seen the Manager overview and there is no servlets registered.
>
> Here is my web.xml file:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>   <servlet>
>      <servlet-name>login</servlet-name>
>      <servlet-class>chapter2.login</servlet-class>
>      <load-on-startup>7</load-on-startup>
>   </servlet>
>   <servlet-mapping>
>      <servlet-name>login</servlet-name>
>      <url-pattern>/chapter2.login</url-pattern>
>    </servlet-mapping>
> </web-app>
>
> I've inserted this in conf/server.xml:
> <Context path="/apress" docBase="apress" debug="9" reloadable="true">
> </Context>
>
> I have these files:
> ./WEB-INF
> ./WEB-INF/classes
> ./WEB-INF/classes/chapter2
> ./WEB-INF/classes/chapter2/HelloTag.java
> ./WEB-INF/classes/chapter2/login.class
> ./WEB-INF/classes/chapter2/login.java
> ./WEB-INF/lib
> ./WEB-INF/web.xml
> ./login.jsp
> ./welcome.jsp
> ./images
> ./images/monitor2.gif
>
> Can anybody help?
>
> Thanks in advance
> --
> John Plate

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org