开发者

LookupDispatchAction problem

I have a problem regarding the LookupDispatchAction class.

The following error i am getting while working,

The error is:

javax.servlet.jsp.JspException: ServletException in '/admin/custom-report.html?action=searchAttributes': You must specify the value attribute or nested tag content

Click to view the complete technical details of this problem:

ServletException in '/admin/custom-report.html?action=searchAttributes': You must specify the value attribute or 开发者_如何学Gonested tag content javax.servlet.jsp.JspException: ServletException in '/admin/custom-report.html?action=searchAttributes': You must specify the value attribute or nested tag content at org.apache.struts.tiles.taglib.InsertTag$InsertHandler.doEndTag(InsertTag.java:924) at org.apache.struts.tiles.taglib.InsertTag.doEndTag(InsertTag.java:462) at _jsp._layout._providerLayout._jspService(_providerLayout.java:218) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at

and My code is

.jsp file (based on radio button selection the request forwarded to aciton class):

<input type="hidden" name="action" value="<bean:message key="custom.report.go" />" id="act" />

my action class:

public class CustomReportAction extends LookupDispatchAction {

  protected Map getKeyMethodMap() 
  {
    Map map = new HashMap();
    map.put("custom.report.home", "home");
    map.put("custom.report.searchattributes", "searchAttributes");
    map.put("custom.report.go", "search");
    return map;
  }

  public ActionForward searchAttributes(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception 
  {
-----
---
} 

struts-config :

<action path="/admin/custom-report" type="org.springframework.web.struts.DelegatingActionProxy" name="CustomReportBean" parameter="action" scope="request" validate="false"> 
      <forward name="searchattributes" path="/jsp/report/customReportSearch.jsp"/>
      <forward name="search" path="customReport"/>
    </action>

please help me here

thanks in advance.


I suppose the reason of your error is a wrong syntax

You open double quotes before <bean:message and close it after key=. For using nested quotes you have to escape it or use a single one for a nested expression.

<input type="hidden" name="action" value="<bean:message key=\"custom.report.go\" />" id="act" />

or

<input type="hidden" name="action" value="<bean:message key='custom.report.go' />" id="act" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜