0
里面我只是不知道如何把我的JSP的HTML体内的RequestDispatcher的响应。这是我的模型:RequestDispatcher的HTML体
RequestDispatcher view = request.getRequestDispatcher("/Overview.jsp");
view.forward(request, response);
PrintWriter out= response.getWriter();
response.setContentType("text/html");
if (count!=0){
int i = 1;
while (i <= count){
out.println("<div>Name: "+batch.getName()+"</div>");
i++;
}
}
else{
out.println("<div><font colour=blue>No Batch</font</div>");
}
当我运行的Servlet我JSP看起来是这样的:
<html>...
<body>
....
</body>
</html>
<div>....
我怎么能够把div的身体里面?
(要显示将在JSP基于servlet的准备变量来实现页面的组成,在调用调度),我强烈建议你阅读[一个关于JSP的好教程](https://docs.oracle.com/javaee/5/tutorial/doc/bnagx.html) – fvu