Reputation: 41
I have written the following code in Eclipse, and store this file in this location: tomcat/webapps/jsp/sample.jsp.
I have also included the Sub directories WEB-INF and classes and lib in this jsp folder.
And I have given this url in the google chrome browser first time and next time in Internet Explorer both shows the 404 error with description:
The requested resource(/jsp/sample.jsp) is not available**.
My code is:
<%@ page language="java" import="java.io.*" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
hello
</body>
</html>
Thank you sir, here are the steps;
1. Tomcat is installed in c:\Program files\Apache\tomcat 7.0\
I am using Eclipse helio zip file and extracted that in c:\eclipse...
Then I have followed the steps from "http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat-7-with-eclipse.html" to set up server in eclipse.
4.Then I start the jsp file from "file->new->other->wizard->web->jsp file. Then I open the jsp file in the eclipse editor.
After that I start the [tomcat7.0 server at localhost]
I save the file and copy the jsp file from the eclipse workspace and paste it in the webapps folder.
these were the steps I have followed.
can you help me sir.
Upvotes: 2
Views: 7599
Reputation: 41
I have solved my problem.
Upvotes: 2