How to run an app in Tomcat?

Posted by artaxerxe on Stack Overflow See other posts from Stack Overflow or by artaxerxe
Published on 2010-06-15T09:17:29Z Indexed on 2010/06/15 9:22 UTC
Read the original article Hit count: 399

Filed under:
|

Hi!

I have put my project in tomcat_home/webapps/ directory. The structure is : project_name/WEB-INF/classes. in WEB-INF i have put my web.xml descriptor. The problem is that when i try to run the application, it doesn't find the files. The error is:

The requested resource () is not available.

My web.xml content is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"

    version="2.4">
<servlet>
   <servlet-name>Chapter1 Servlet</servlet-name>
   <servlet-class>Ch1Servlet</servlet-class>
</servlet>

<servlet-mapping>
   <servlet-name>Chapter1 Servlet</servlet-name>
   <servlet-url>/Serv1</servlet-url> 
</servlet-mapping>
</web-app>

I have also restarted the server, but it doesn't want to work. Any suggestions?

© Stack Overflow or respective owner

Related posts about java

Related posts about tomcat