facebook

HTTP 404 error for index.jsp

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #270908 Reply

    pinesystems
    Member

    Hi,
    I created a WebProject using the given default index.jsp.
    I then started the Tomcat 5.x server successfully.
    When I visited the following URL:
    http://localhost:8080, I saw the default Tomcat home page (so far so good)

    However, when I enter
    http://localhost:8080/WebProject/WebRoot/index.jsp,

    I got the HTTP 404 error.

    What did I do incorrectly?
    Thanks,
    Jimmy

    #270936 Reply

    Loyal Water
    Member
    #270947 Reply

    pinesystems
    Member

    It still does NOT work.

    The following is the content of index.jsp

    <%@ page language=”java” import=”java.util.*” pageEncoding=”ISO-8859-1″%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+”://”+request.getServerName()+”:”+request.getServerPort()+path+”/”;
    %>

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>
    <base href=”<%=basePath%>”>

    <title>My JSP ‘index.jsp’ starting page</title>
    <meta http-equiv=”pragma” content=”no-cache”>
    <meta http-equiv=”cache-control” content=”no-cache”>
    <meta http-equiv=”expires” content=”0″>
    <meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
    <meta http-equiv=”description” content=”This is my page”>
    <!–
    <link rel=”stylesheet” type=”text/css” href=”styles.css”>
    –>
    </head>

    <body>
    This is my JSP page. <br>
    <form action=”/servlet/EasyColorServlet”>
    <input type=”submit” value=”submit”>
    </form>
    </body>
    </html>

    #270951 Reply

    pinesystems
    Member

    The strange thing is that when I highlighted “index.jsp” and right click and run.
    I saw the following choices (I don’t see any Web-related item)
    1. Eclipse Application
    2. Equinox OSGi Framework
    3. Java Applet
    4. Java Application
    5. JUnit
    6. JUnit Plug-in Test
    7. SWT Application

    Please help!

    #271062 Reply

    Loyal Water
    Member

    @pinesystems wrote:

    The strange thing is that when I highlighted “index.jsp” and right click and run.
    I saw the following choices (I don’t see any Web-related item)
    1. Eclipse Application
    2. Equinox OSGi Framework
    3. Java Applet
    4. Java Application
    5. JUnit
    6. JUnit Plug-in Test
    7. SWT Application

    Please help!

    This is normal behavior.

    Check if your action page (/servlet/EasyColorServlet) exists.

    #271092 Reply

    pinesystems
    Member

    Yes, /servlet/EasyColorServlet is there.
    Even if it is NOT, I still should see the index.jsp.

    The servlet will not be invoked until the “submit” button is clicked.

    #271093 Reply

    pinesystems
    Member

    Yes, /servlet/EasyColorServlet is there.
    Even if it is NOT, I still should see the index.jsp.

    The servlet will not be invoked until the “submit” button is clicked.

    #271100 Reply

    Loyal Water
    Member

    I tried running the index.jsp code you pasted at my end and it works perfectly fine till I hit the submit button. Can you create a new webproject called TestWebProject and then deploy it and run the default index.jsp using http://localhost:8080/TestWebProject/index.jsp and see of that works?

    #271102 Reply

    pinesystems
    Member

    Still no luck.
    Here is what I did:
    1. File->New->Project->Web Project
    2. Click “Next”
    3. Enter Project Name: TestWebProject
    4. Use Default WebRoot Folder name: WebRoot
    5. Click “Finish”
    6. Start “MyEclipse Tomcat5 server
    7. Open IE browser 6.0.29 and enter
    http://localhost:8080/TestWebProject/index.jsp

    Error message appears below:

    HTTP Status 404 – /TestWebProject/index.jsp

    ——————————————————————————–

    type Status report

    message /TestWebProject/index.jsp

    description The requested resource (/TestWebProject/index.jsp) is not available.

    ——————————————————————————–

    Apache Tomcat/5.5.17

    #271126 Reply

    Loyal Water
    Member

    Did you deploy the project after step 5 ?

    #271154 Reply

    pinesystems
    Member

    How do I deploy the project?

    #271169 Reply

    Loyal Water
    Member

    Go through this tutorial on how to work with web projects. It explains the deployment process as well.
    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: HTTP 404 error for index.jsp

You must be logged in to post in the forum log in