Structs (jdeveloper)

hwg119 2005-03-23 11:27:18
初学Structs,遇到一点问题请大虾执教
jsp:
<logic:equal name="page" property="hasNextPage" value="true">
<html:link page="/page.do?action=nextPage">nextPage</html:link>
</logic:equal>

struts-config.xml:
<action path="/page" type="addressbook.PageListAction" scope="request">
<forward name="success" path="/pagetest.jsp"/>
</action>

在addressbook.PageListAction.java 已经写好了。

可是运行后出现:
javax.servlet.jsp.JspException: No bean found under attribute key page at org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:221) at org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90) at org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagBase.java:218) at _pagetest._jspService(pagetest.jsp:32) [/pagetest.jsp] at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:57) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

请问这是什么原因?
...全文
46 点赞 收藏 2
写回复
2 条回复
hwg119 2005年03月23日
可是我在 struts-config.xml中已经写了path="/page"了,
他应该先运行struts-config.xml再执行页面的吧?

<action path="/page" type="addressbook.PageListAction" scope="request">
<forward name="success" path="/pagetest.jsp"/>
</action>
回复 点赞
fingertiploneliness 2005年03月23日
没有名称为page的bean
jsp:
<logic:equal name="page" property="hasNextPage" value="true">
<html:link page="/page.do?action=nextPage">nextPage</html:link>
</logic:equal>
错在这里
回复 点赞
发动态
发帖子
Web 开发
创建于2007-09-28

5.2w+

社区成员

34.1w+

社区内容

Java Web 开发
社区公告
暂无公告