Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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-tf3896399.html#a11046023
Sent from the Eclipse WTP - general mailing list archive at Nabble.com.



Back to the top