我是一个Struts的初学者 对MyEclipse中出现的问题还不是很清楚 还请各位高手多多帮忙
下面是我的程序:
=====================================================================================
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld" %>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld" %>
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld" %>
<%@ page contentType="text/html; charset=GB18030" language="java"%>
<html:html locale="true">
<head>
<title><bean:message key="hello.jsp.title "/>"</title>
<html:base/>
</head>
<body bgcolor="white"><p>
<h2><bean:message key="hello.jsp.page.heading"/></h2><p>
<html:errors/><p>
<logic:present name="personbean" scope="request"/>
<h2><bean:message key="hello.jsp.page.hello"/>
<bean:write name="personbean" property="username"/>!<p>
</h2>
</logic:presen>
<html:form action="/HelloWorld.do" focus="username">
<bean:message key="hello.jsp.prompt.person"/>
<html:text property="username" size="16" maxlength="16"/><br>
<html:submit property="sunbmit" value="Submit"/>
<html:reset/>
</html:form><br>
</body>
</html:html>
====================================================================================
以下是我的错误提示:
====================================================================================
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /hello.jsp(20,0) The end tag "</logic:presen" is unbalanced
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: /hello.jsp(20,0) The end tag "</logic:presen" is unbalanced
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
org.apache.jasper.compiler.Parser.checkUnbalancedEndTag(Parser.java:1723)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1578)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1806)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1069)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1377)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
Apache Tomcat/5.5.20
</logic:presen>
改成
</logic:present>
<html:html></html:html>改成<html></html>
--转自