如何处理struts请求串连问题

06-09-09 talkboy

我现在遇到一个问题,我希望在一个页面有列表也有编辑的form表单,我用struts请求串连这种方式来处理,如果先执行列表请求再执行编辑页面可以成功,当我先执行编辑页面的表单请求后执行例表请求时报错,提示如下:

org.apache.jasper.JasperException: Exception in JSP: /pubinfo/editSiteArticle.jsp:23

20: 文章分类

21: <html:select property="siteColumn.siteColumnId">

22: <html:option value="">请选择...</html:option>

23: <html:optionsCollection name="sAColumnListForm" property="list" value="siteColumnId" label="columnName"/>

24: </html:select>

25: articleId<html:text name="siteArticleForm" property="articleId" /><br>

26: articleTitle<html:text name="siteArticleForm" property="articleTitle" /><br>

Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)

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:810)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.servlet.ServletException: Cannot find bean sAColumnListForm in any scope

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspService(editSiteArticle_jsp.java:103)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

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:810)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

root cause

javax.servlet.jsp.JspException: Cannot find bean sAColumnListForm in any scope

org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)

org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:175)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_optionsCollection_0(editSiteArticle_jsp.java:330)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_select_0(editSiteArticle_jsp.java:264)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_form_0(editSiteArticle_jsp.java:169)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_html_0(editSiteArticle_jsp.java:128)

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspService(editSiteArticle_jsp.java:96)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

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:810)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

talkboy
2006-09-09 10:08

<p>org.apache.jasper.JasperException: Exception in JSP: /pubinfo/editSiteArticle.jsp:23</p>

<p>20: 文章分类<br />

21: <html:select property="siteColumn.siteColumnId"><br />

22: <html:option value="">请选择...</html:option><br />

23: <html:optionsCollection name="sAColumnListForm" property="list" value="siteColumnId" label="columnName"/> <br />

24: </html:select><br />

25: articleId<html:text name="siteArticleForm" property="articleId" /><br><br />

26: articleTitle<html:text name="siteArticleForm" property="articleTitle" /><br><br />

</p>

<p>Stacktrace:<br />

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)<br />

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)<br />

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)<br />

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)<br />

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)<br />

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)<br />

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)<br />

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)<br />

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br />

</p>

<p>root cause </p>

<p>javax.servlet.ServletException: Cannot find bean sAColumnListForm in any scope<br />

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)<br />

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspService(editSiteArticle_jsp.java:103)<br />

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)<br />

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)<br />

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)<br />

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)<br />

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)<br />

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)<br />

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)<br />

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br />

</p>

<p>root cause </p>

<p>javax.servlet.jsp.JspException: Cannot find bean sAColumnListForm in any scope<br />

org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:992)<br />

org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:175)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_optionsCollection_0(editSiteArticle_jsp.java:330)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_select_0(editSiteArticle_jsp.java:264)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_form_0(editSiteArticle_jsp.java:169)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspx_meth_html_html_0(editSiteArticle_jsp.java:128)<br />

org.apache.jsp.pubinfo.editSiteArticle_jsp._jspService(editSiteArticle_jsp.java:96)<br />

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)<br />

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)<br />

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)<br />

org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)<br />

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)<br />

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)<br />

org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br />

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)<br />

com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:92)<br />

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)</p>

banq
2006-09-11 20:00

>当我先执行编辑页面的表单请求后执行例表请求时报错

>Cannot find bean sAColumnListForm in any scope

没有发现Jsp中调用得sAColumnListForm ,你可使用logic:empty来判断,如果sAColumnListForm 不为空再使用。