Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [wtp-dev] Why does i receive ah http 404 error

The proper place to ask questions about using WTP is the WebTools newsgroup.  See http://www.eclipse.org/newsgroups/index.php.  Please follow up there, since this mailing list is for developing WTP.

A quick test of your files works for me.  So the problem is something else.  You don't appear to be using XDoclet, so I'm not sure if you need to be adding that facet to the your project.  You might try again without it.

Cheers,
Larry
 

> -----Original Message-----
> From: wtp-dev-bounces@xxxxxxxxxxx 
> [mailto:wtp-dev-bounces@xxxxxxxxxxx] On Behalf Of fc
> Sent: Sunday, June 10, 2007 1:26 AM
> To: wtp-dev@xxxxxxxxxxx
> Subject: [wtp-dev] Why does i receive ah http 404 error
> 
> 
> hi,
> I am creating a simple dynamic web project, and for some 
> reason, when i starts the server & try to access by url a 
> simple servelet, I receive an http 404 error. (at any 
> browser) (this error means that the server is accessible, but 
> the specific resource at the server is not accessible).
> this happens when i use tomcat sever and when i use "J2ee 
> preview server".
> 
> my web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="WebApp_ID" version="2.4"
> 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
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> 	<display-name>
> 	w</display-name>
> 	<servlet>
> 		<description>
> 		</description>
> 		<display-name>
> 		E</display-name>
> 		<servlet-name>E</servlet-name>
> 		<servlet-class>
> 		e.E</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>E</servlet-name>
> 		<url-pattern>/E</url-pattern>
> 	</servlet-mapping>
> 	<welcome-file-list>
> 		<welcome-file>index.html</welcome-file>
> 		<welcome-file>index.htm</welcome-file>
> 		<welcome-file>index.jsp</welcome-file>
> 		<welcome-file>default.html</welcome-file>
> 		<welcome-file>default.htm</welcome-file>
> 		<welcome-file>default.jsp</welcome-file>
> 	</welcome-file-list>
> </web-app>
> 
> my servlet : 
> package e;
> 
> import java.io.IOException;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> 
> /**
>  * Servlet implementation class for Servlet: E
>  *
>  */
>  public class E extends javax.servlet.http.HttpServlet 
> implements javax.servlet.Servlet {
>    static final long serialVersionUID = 1L;
>    
>     /* (non-Java-doc)
> 	 * @see javax.servlet.http.HttpServlet#HttpServlet()
> 	 */
> 	public E() {
> 		super();
> 	}   	
> 	
> 	/* (non-Java-doc)
> 	 * @see 
> javax.servlet.http.HttpServlet#doGet(HttpServletRequest 
> request, HttpServletResponse response)
> 	 */
> 	protected void doGet(HttpServletRequest request, 
> HttpServletResponse
> response) throws ServletException, IOException {
> 		// TODO Auto-generated method stub
> 		
> response.getWriter().write("<html><head><head><body></body></html>");
> 	}  	
> 	
> 	/* (non-Java-doc)
> 	 * @see 
> javax.servlet.http.HttpServlet#doPost(HttpServletRequest 
> request, HttpServletResponse response)
> 	 */
> 	protected void doPost(HttpServletRequest request, 
> HttpServletResponse
> response) throws ServletException, IOException {
> 		// TODO Auto-generated method stub
> 		
> response.getWriter().write("<html><head><head><body></body></html>");
> 	}   	  	    
> } http://www.nabble.com/file/p11046023/1.jpg
> http://www.nabble.com/file/p11046023/2.jpg
> http://www.nabble.com/file/p11046023/3.jpg
> http://www.nabble.com/file/p11046023/4.jpg
> --
> View this message in context: 
> http://www.nabble.com/Why-does-i-receive-ah-http-404-error-tf3
> 896399.html#a11046023
> Sent from the Eclipse WTP - general mailing list archive at 
> Nabble.com.
> 
> _______________________________________________
> wtp-dev mailing list
> wtp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/wtp-dev
> 


Back to the top