我用JSP+Beans+MySQL调试一个程序,出现错误提示是什么意思?org.apache.jasper.JasperException: /myshop/index.jsp(3,0) Page directiv
错误提示:org.apache.jasper.JasperException: /myshop/index.jsp(3,0) Page directive: can't have multiple occurrences of contentType
代码片段:
<%@ include file = "config.jsp" %>
<%@ page import = "java.util.*" %>
<%@ page import = "myshop.product_sys.productBean" %>
<%@ page contentType = "text/html;charset=GBK" %>
<jsp:useBean id="ManagerProduct" scope="page" class="myshop.product_sys.ManagerProduct"/>
<jsp:useBean id="ManagerCatalog" scope="page" class="myshop.catalog_sys.ManagerCatalog"/>
<jsp:useBean id="ManagerMember" scope="page" class="myshop.member_sys.ManagerMember"/>
<jsp:useBean id="ManagerNews" scope="page" class="myshop.news_sys.ManagerNews"/>
<jsp:useBean id="ManagerHandle" scope="page" class="myshop.Handle"/>
问题点数:20、回复次数:3Top
1 楼bruni(不如你)回复于 2003-08-01 18:48:16 得分 15
You cannot specify contentType twice.
It seems you've set contentType already in your included file 'config.jsp'.
just remove
<%@ page contentType = "text/html;charset=GBK" %>
in this page.Top
2 楼whyxx(最近有点闲)回复于 2003-08-01 19:30:06 得分 5
你在config.jsp里已经有了<%@ page contentType = "text/html;charset=GBK" %>这句话,而且在你自己的index.jsp里又写了一次,就是这个错,Top
3 楼wtoeb(FAQC.COM)回复于 2003-08-01 19:38:59 得分 0
谢谢!!!非常感谢!!!Top




