Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » why am I recieving HTTP ERROR: 404
why am I recieving HTTP ERROR: 404 [message #195750] Thu, 05 July 2007 21:25 Go to next message
Eclipse UserFriend
Originally posted by: tauberg.013.net

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" or
any other.

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>");
}
}





  • Attachment: 1.jpg
    (Size: 85.38KB, Downloaded 97 times)
  • Attachment: 2.jpg
    (Size: 44.35KB, Downloaded 102 times)
  • Attachment: 3.jpg
    (Size: 30.36KB, Downloaded 100 times)
  • Attachment: 4.jpg
    (Size: 65.10KB, Downloaded 96 times)
Re: why am I recieving HTTP ERROR: 404 [message #195763 is a reply to message #195750] Thu, 05 July 2007 21:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tauberg.013.net

I may add, that it also happens with jsp files.

& I have a jre1.6.

& it happens also when i set the project facet to java6.

& i done this and it still happens:

at a new computer i download&install jre1.6

i download&install eclipse

i download&install wtp

i created a dynamic web project using the wizard

& stiil getting this 404 error.

my project is attached

"david" <tauberg@013.net>
  • Attachment: f.rar
    (Size: 5.34KB, Downloaded 109 times)
Re: why am I recieving HTTP ERROR: 404 [message #195787 is a reply to message #195763] Fri, 06 July 2007 12:59 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1310
Registered: July 2009
Senior Member
I tried your files using a new workspace with Tomcat 5.5 and the J2EE
Preview server and everything worked as expected. It's not clear what
is different about your workspace that is causing this behavior. Is
there anything in the console log that might give a clue?

Cheers,
Larry

david wrote:
> I may add, that it also happens with jsp files.
>
> & I have a jre1.6.
>
> & it happens also when i set the project facet to java6.
>
> & i done this and it still happens:
>
> at a new computer i download&install jre1.6
>
> i download&install eclipse
>
> i download&install wtp
>
> i created a dynamic web project using the wizard
>
> & stiil getting this 404 error.
>
> my project is attached
>
> "david" <tauberg@013.net> ëúá áäåãòä:f6jnpv$8u0$1@build.eclipse.org...
>
>> 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"
>> or
>> any other.
>>
>> 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>");
>> }
>> }
>>
>>
>>
>
>
Re: why am I recieving HTTP ERROR: 404 [message #195828 is a reply to message #195787] Sat, 07 July 2007 10:12 Go to previous message
Eclipse UserFriend
Originally posted by: tauberg.013.net

hi thank you!
you have also answered me at the :
http://www.nabble.com/Why-does-i-receive-ah-http-404-error-t f3896399.html
i slove this like that:
i downloaded eclipse for jee developers from :
http://www.eclipse.org/downloads/
& run the project.
& now it works!


"Larry Isaacs" <Larry.Isaacs@sas.com> ???
??????:f6lebj$gvf$1@build.eclipse.org...
>I tried your files using a new workspace with Tomcat 5.5 and the J2EE
>Preview server and everything worked as expected. It's not clear what is
>different about your workspace that is causing this behavior. Is there
>anything in the console log that might give a clue?
>
> Cheers,
> Larry
>
> david wrote:
>> I may add, that it also happens with jsp files.
>>
>> & I have a jre1.6.
>>
>> & it happens also when i set the project facet to java6.
>>
>> & i done this and it still happens:
>>
>> at a new computer i download&install jre1.6
>>
>> i download&install eclipse
>>
>> i download&install wtp
>>
>> i created a dynamic web project using the wizard
>>
>> & stiil getting this 404 error.
>>
>> my project is attached
>>
>> "david" <tauberg@013.net>
Previous Topic:WTP 3.0 Requirements: Call for participation..
Next Topic:Extract to resource bundle
Goto Forum:
  


Current Time: Mon Nov 24 20:36:51 GMT 2014

Powered by FUDForum. Page generated in 0.02176 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software