text not showing

<h1>JSP Page</h1>

this text shows

<jsp:include page="/IncludeHandler" flush="true"/>//myservlet

this text does not show

</body>

</html>

[356 byte] By [Preachinga] at [2007-10-3 9:20:21]
# 1

package web;

import java.io.*;

import java.net.*;

import javax.servlet.*;

import javax.servlet.http.*;

/**

*

* @author javious

* @version

*/

public class IncludeTest extends HttpServlet {

/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.

* @param request servlet request

* @param response servlet response

*/

protected void processRequest(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException {

response.setContentType("text/html;charset=UTF-8");

PrintWriter out = response.getWriter();

out.println("<h3>Hi! I'm a servlet who is included!</h3>");

// DON't CLOSE YOUR OUTPUT STREAM!!! YOUR ONLY INCLUDED, NOT THE FINAL WORD!

//out.close();

}

}

<%@page contentType="text/html"%>

<%@page pageEncoding="UTF-8"%>

<!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=UTF-8">

<title>JSP Page</title>

</head>

<body>

<h1>JSP Page</h1>

this text shows

<jsp:include page="/IncludeTest" flush="true"/>//myservlet

this text shows

</body>

</html>

javiousa at 2007-7-15 4:33:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Could be an HTML issue rather than a JSP issue. Do a view source of the resulting HTML page and check wether the text is on the page but just not being displayed
tolmanka at 2007-7-15 4:33:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...