请问一个关于out.println()的执行顺序的问题!
jbas 2004-10-07 06:36:50 我有一个页面a.jsp,内容如下:
<jsp:useBean id="idmy" class="com.my.Ex" scope="page"/>
<html>
<body>
aaaaaaaaaa<br>
<%=idmy.pt(response,"mystr")%>
</body>
</html>
com.my.Bx中的内容为:
public class Bx
{
public static void pt(HttpServletResponse response,String str){
response.getWriter().println(str);
}
....
}
现在我把这个a.jsp页面放到resin服务器下执行,我得到的页面html代码为:
<html>
<body>
aaaaaaaaaaaaa
mystr
</body>
</html>
但是我把他放到tomat或jboss服务器下执行会是这样的:
mystr
<html>
<body>
aaaaaaaaaaaaa
</body>
</html>
我也想在tomat或jboss服务器下得到
<html>
<body>
aaaaaaaaaaaaa
mystr
</body>
</html>的效果,请问我该怎样做???我执行了response.getWriter().flush();也不行!
谢谢了!