我有doPost
一个 servlet -
protected void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
request.getSession().setAttribute("sysMsg","now we gonna to break line \n");
// forward to printLine.jsp page
dispather.forward(request, response) ;
}
和jsp页面(说,printLine.jsp
) -
<html>
<head>
<title></title>
</head>
<body>
<font size="30" color="Red">${sysMsg} </font>
</body>
</html>
我希望在finally break lineprintLine.jsp
的打印中sysMsg
...对于在 servlet 中设置他时放在\n
最后的sysMsg
那个,但是这种方式行不通。