帮忙解决图形验证码问题
两个页面
验证码页面 image.jsp
单独使用 可以很正常 contentType="image/jpeg"
注册页面 register.jsp
contentType="text/html; charset=gb2312"
单独使用 ,很正常
但是我把 image.jsp 加到 register.jsp的时候就不行了
我试了两种方法
<%@ include file="image.jsp" model="true"%>
<%@ include file="image.jsp" Model="true"%>
<%@ include file="image.jsp" %>
这样都不行
出的错误是一样的
"register.jsp": org.apache.jasper.JasperException: file:E:/myporject/school/SchoolModel/image.jsp(1,1) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=gb2312, new: image/jpeg)
我的web.xml 的配置
<jsp-config>
<jsp-property-group>
<description>htmls encoding example</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.html</url-pattern>
<el-ignored>true</el-ignored>
<page-encoding>gb2312</page-encoding>
<scripting-invalid>false</scripting-invalid>
</jsp-property-group>
</jsp-config>
但是似乎对我的页面 没什么影响
我还是得手动添加
contentType="text/html; charset=gb2312"
才能解决乱码问题
我的环境jbuilder tomcat 5 +j2se 1.5
哪位知道怎么解决的麻烦说一下
谢了