我用的MYECLIPSE5。1和Tomcat 5.5
写了个JSP,代码
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="WEB-INF\struts-html.tld" prefix="html"%>
<%@ taglib uri="WEB-INF\struts-bean.tld" prefix="bean"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<html:form action="linyuan.do">
<html:text property="id"></html:text>
<html:password property="passWord"></html:password>
<html:submit value="Submit"/>
</html:form>
</body>
</html>
去掉STRUTS标签就不报错了~~~~~~~
报错:不能编译,又不说错在哪里。请高手指点一下!!!!!!
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
--------------------------------------------
------解决方案--------------------
STRUTS配了吗?
------解决方案--------------------
<%@ taglib uri="WEB-INF\struts-html.tld" prefix="html"%>
<%@ taglib uri="WEB-INF\struts-bean.tld" prefix="bean"%>
确定web-inf下放了struts-html.tld与struts-bean.tld么?
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317
代码迷推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.daimami.com/search?q=2308