- This topic has 5 replies, 2 voices, and was last updated 17 years, 7 months ago by Riyad Kalla.
-
AuthorPosts
-
saravanan_vMemberI have created a web proj.. using eclipse as the IDE..
The deployment descriptor file web.xml has all the mappings correctly..
but none of the servlets in the proj is accessible..
the servlets’ class files are present in the deployed file also..
The proj was completed in one system and ported to a new system..
the proj still works fine with the old system..
all configurations pertaining to the Jboss server are correct..
Riyad KallaMemberMoving to OT > Soft Dev
saravanan_vMemberI understand the problem is with the configuration and not with the Project..
Because even if i create a new proj and a new servlet in it and try to access it… it is unavailable..
But i could not figure out where exactly the problem is..
The configurations are as per the tuorial downloaded from this website…
Riyad KallaMemberWhat is the name of the servlet? What does your web.xml file look like? And lastly, what URL are you using to try and access it?
saravanan_vMemberthe name of the servlet is LoginServlet..
following is the section in the web.xml file corresponding to the login servlet..<servlet>
<description>This is the description of my J2EE component</description>
<display-name>LoginServlet</display-name>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>com.genuitec.portalx.web.LoginServlet</servlet-class>
</servlet><servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/servlet/LoginServlet</url-pattern>
</servlet-mapping>and im calling the servlet with the form’s action attribute… with the URL /servlet/LoginServlet
Riyad KallaMemberyou are using an absolute path, which is why you are getting the error. You need servlet/LoginServlet, because consider your path:
http://localhost:8080/myapp/login.jspfrom here, /servlet/LoginServlet will resolve to this:
http://localhost:8080/servlet/LoginServletwhich doesn’t exist, what you want is:
http://localhost:8080/myapp/servlet/LoginServlet -
AuthorPosts