- This topic has 11 replies, 2 voices, and was last updated 17 years, 5 months ago by Loyal Water.
-
AuthorPosts
-
pinesystemsMemberHi,
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
pinesystemsMemberIt 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>
pinesystemsMemberThe 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 ApplicationPlease help!
Loyal WaterMember@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 ApplicationPlease help!
This is normal behavior.
Check if your action page (/servlet/EasyColorServlet) exists.
pinesystemsMemberYes, /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.
pinesystemsMemberYes, /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.
Loyal WaterMemberI 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?
pinesystemsMemberStill 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.jspError 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
Loyal WaterMemberDid you deploy the project after step 5 ?
pinesystemsMemberHow do I deploy the project?
Loyal WaterMemberGo 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 -
AuthorPosts