Hi
Please help me on this. This is urgent.
I am using jboss-3.2.1_tomcat-4.1.24 version and I made a simple web application and put the war file in JBOSS\server\default\deploy directory.
WEB-INF\web.xml
WEB-INF\classes\TestServlet
is my directory structure of my war and my web.xml is
<?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>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet>
</web-app>
If i start the
jBoss, I see my test.war being deployed fine. But, if Iaccess it as
http://localhost:8080/test/servlet/TestServlet froma browser, I get a 404 error and jBoss console says
"mapping error for URI /test/servlet/TestServlet"
I then tried adding a servlet-mapping to my web.xml by adding
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Now, if I access using the URL
http://localhost:8080/test/, it goes to the testServlet page. I need to add more serlvlets now. This mapping is not right. Books i read say that without mapping itself, we should be able to access the servlet, but I always get 404 and mapping error of URI. What do i do. Please help me soon.