- This topic has 11 replies, 2 voices, and was last updated 18 years 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,
JimmyMay 31, 2007 at 3:18 pm #270936May 31, 2007 at 4:48 pm #270947
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>May 31, 2007 at 4:54 pm #270951
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!
June 4, 2007 at 5:25 am #271062
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.
June 4, 2007 at 12:21 pm #271092
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.
June 4, 2007 at 12:21 pm #271093
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.
June 4, 2007 at 1:09 pm #271100
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?
June 4, 2007 at 1:46 pm #271102
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
June 5, 2007 at 4:14 am #271126
Loyal WaterMemberDid you deploy the project after step 5 ?
June 5, 2007 at 2:36 pm #271154
pinesystemsMemberHow do I deploy the project?
June 6, 2007 at 8:41 am #271169
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