什么原因呢?

kentenjoy 2004-09-29 11:33:27
我用jbuilder9新建了一个struts的jsp页面,页面内容如下:
<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">
<h1>
JBuilder Generated JSP
</h1>
<form method="post">
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
</form>
<html:text property="aaaa"/>
</body>
</html>


运行后,错误如下:
tandardWrapperValve[debugjsp]: Servlet.service() for servlet debugjsp threw exception

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in scope null

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)

at org.apache.jsp.jsp1$jsp._jspService(jsp1$jsp.java:111)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)

at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)

at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)

at java.lang.Thread.run(Thread.java:536)

Stopping service Tomcat-Standalone

HttpConnector[8080] Stopping background thread

StandardHost[localhost]: Removing web application at context path
怎么办呢?
...全文
46 点赞 收藏 6
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
whirlsun 2004-09-30
支持楼上,应该是ActionForm里面没能aaaa属性
回复
kentenjoy 2004-09-30
up
回复
scottwhb 2004-09-30
1.AbcAction所关联的form应该有aaaa这个属性;
2.<html:text ....>在form的外面;
回复
bluesky35 2004-09-30
必须定义form bean,并且在struts-config.xml中定义好.
回复
zhonghua2003 2004-09-30
为了文静,努力工作!!帮你顶!!祝楼主幸福美满!!
回复
popufig 2004-09-29
你想运行出什么东东?
<html:text ....>在form的外面
而且你的form没有name属性,还有你要submit到哪里?
<html:form action = "abcAction.do" method = "POST">
<html:text property="aaaa"/>
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
</html:form>
这时AbcAction所关联的form应该有aaaa这个属性
回复
发动态
发帖子
Web 开发
创建于2007-09-28

7.9w+

社区成员

Java Web 开发
申请成为版主
社区公告
暂无公告