include directive not working in eclipse
Hello All,
I am using eclipse dynamic web project. I have the main project by the name of JSPEXAMPLE and then i have intro.jsp under web-inf folder for JSPEXAMPLE. i am trying to include a Header.html file. where do i need to save this html file ? i mean in which folder? JSPEXAMPLE? or WEB-INF? i tried to save the sttaic html file in Web-INF and while running my jsp file it gives me an error.
intro.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page session="false" %>
<%@ page import="java.util.Calendar" %>
<%@ include file="/Header.html" %>
<%
out.println("The time is now " + Calendar.getInstance().getTime());
%>
<%@ include file="Footer.html" %>
Here is the Header.html and Footer.html
<!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>WellCome</title>
</head>
<body>
Footer.html
</body>
</html>
While runing i get an error that file Header.html is not found but why? i mean i can see it under JSPEXAMPLES/WEB-INF folder
org.apache.jasper.JasperException: /intro.jsp(5,0) File "/Header.html" not found
Can anyone help? Thanks
Message was edited by:
lrngjava

