最近一段时间一直在用struts1 开发项目 制作页面的使用一般有 head ,content,bottom等等几个部分 因为导航和底部的数据一般是不变的 所以我们只要引入这个页面即可 在未使用Struts1 之前一直使用 <jsp:include page=""></jsp:include> 这个标签 但引入Struts1 之后通过Action返回时 jsp:include 这个标签就会出现异常了
有如下两种解决的方法
1。采用tiles框架
2。bean标签
<bean:include id="head" page="/head.jsp" />
<bean:write name="head" filter="false" scope="page"/>
但是, forward的页面 却出现了中文乱码,head.jsp 页面的编码是utf-8 。查看了一下资料 换成gb2321 之后 确实乱码就消失啦 !