File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "404 error" Watch "404 error" New topic
Author

404 error

shubhangi phadke
Greenhorn

Joined: Feb 05, 2007
Posts: 2
Hi,

I am getting request resource not avialbe when i access the servlet class which is alredy present in correct path as page30-31 in HeadFirst jsp&servlets..

Created the correct directory structure under webapps/ch1 : WEB-INF and classes put web.xml and class file correctly..

able to access servlet-examples ans jsp-examples but not the below one

http://localhost:8080/ch1/Serv1


My web.xml is


<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 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>
<url-pattern>/Serv1</url-pattern>
</servlet-mapping>
</web-app>



Can anyone help me out in solving this..
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

You should put your servlets in packages, to avoid unpredictable results.


[My Blog]
All roads lead to JavaRanch
S Kapoor
Greenhorn

Joined: Mar 31, 2006
Posts: 20
Confirm that this is the name and location of the servlet class:
webapps\ch1\WEB-INF\classes\Ch1Servlet.class


SCJP, SCJWS, SCWCD
shubhangi phadke
Greenhorn

Joined: Feb 05, 2007
Posts: 2
hey thanks ,i got the result
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 404 error