Hi,
I'm using Jboss 2.4.3-Tomcat 4.0
I've successfully executed the tomcat-test.ear application, but when I try to do the same with mine it fails.
The error that occurs is:
HTTP Status 404 - /myfirstservlet
The requested resource (/myfirstservlet) is not available.
The ear file is successfully deployed and I can see the Index.html home page, but it seems it can't see my servlets.
To build my war file I did these steps:
1) created the WEB-INF dir and put the web.xml file in:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet-name>myfirstservlet</servlet-name>
<servlet-class>myfirstservlet</servlet-class>
</web-app>
2) created the classes dir and put the myfirstservlet.class in
3) execute the jar cvf myapp.war * command
4) created the myapp.ear file with the myapp.war and the myapp.jar ones and the application.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<display-name>test</display-name>
<web-uri>myapp.war</web-uri>
<context-root>/myapp</context-root>
myapp.jar
What am I missing?
Thanks
Found solution by myself.
For those who are interested here it is:
in file web.xml the following lines must be added:
<servlet-mapping>
<servlet-name>myfirstservlet</servlet-name>
<url-pattern>/myfirstservlet</url-pattern>
</servlet-mapping>