Ok, I got this jsp file & it works ok
<html>
<head><title>Account</title></head>
<body>
<%@ include file="header.jsp" %>
</body>
</html>
Now, I got a servlet
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.getWriter().println("<html>"+
"<head><title>Account</title></head>"+
"<body>"+
"<%@ include file=\"header.jsp\" %>"+
"</body"+
"</html>"
}
The servlet print out <%@ include file="header.jsp" %>
as a text on the page & could not understand that it is a <%@ include file="header.jsp" %>
.
How can let servlet to print out the result exactly like the jsp file I mentioned above?