Results 1 to 3 of 3
- 08-23-2011, 09:52 PM #1
Member
- Join Date
- Aug 2011
- Posts
- 1
- Rep Power
- 0
Class not found exception for the servlet class.
I have created a servlet class with do get method in it.When am trying to run it on the tomcat server, it says class not found exception.Below is the servlet configuration in web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SimpleProject</display-name>
<servlet>
<description>Servlet uses Get </description>
<display-name>ServletName</display-name>
<servlet-name>ServletName</servlet-name>
<servlet-class>MyPackg.Serv.SimpleServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletName</servlet-name>
<url-pattern>/SimpleServletPath</url-pattern>
</servlet-mapping>
</web-app>.
When am trying to hit the URL http://localhost:8080/SimpleProject/SimpleServletPath, it says MyPackg.Serv.SimpleServlet is not found. Can some one help me with this issue.
It is able to recognize the application simpleproject but when i access simpleservletpath it throws the class not found error.
- 08-24-2011, 01:33 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
It seems all your web.xml mappings name the servlet 'ServletName'...try renaming it in your web.xml, or accessing the servlet with this name.
- 08-24-2011, 09:20 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
Class Not Found Exception when trying to open a .jar file
By oontvoo in forum Advanced JavaReplies: 6Last Post: 07-25-2011, 10:34 AM -
Class not found Exception
By surendra in forum Java ServletReplies: 8Last Post: 06-09-2011, 12:52 PM -
Exception Class for class that compares objects variables. Help Please.
By darkblue24 in forum New To JavaReplies: 1Last Post: 01-03-2010, 09:48 PM -
class not found exception while using IKVM to create exe for c#
By manjunath k reddy in forum New To JavaReplies: 0Last Post: 02-21-2009, 06:05 AM -
javax.servlet.ServletException: Wrapper cannot find servlet class util.t2
By osval in forum Advanced JavaReplies: 1Last Post: 08-07-2007, 03:47 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks