• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Struts-Layout Error

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am using struts layout for Datagrid. I am using DispatchAction. I am getting the following error..Can anyone suggest a solution?

[Servlet Error]-[org.apache.struts.util.RequestUtils: method getActionMappingName(Ljava/lang/String;)Ljava/lang/String; not found]: java.lang.NoSuchMethodError: org.apache.struts.util.RequestUtils: method getActionMappingName(Ljava/lang/String Ljava/lang/String; not found
at fr.improve.struts.taglib.layout.FormTag.computeActionName(FormTag.java:159)
at fr.improve.struts.taglib.layout.FormTag.computeActionParameter(FormTag.java:148)
at fr.improve.struts.taglib.layout.FormTag.processRequestCode(FormTag.java:126)
at fr.improve.struts.taglib.layout.FormTag.doStartLayoutTag(FormTag.java:105)
at fr.improve.struts.taglib.layout.LayoutTagSupport.doStartTag(LayoutTagSupport.java:34)
at org.apache.jsp._errorCodes._jspService(_errorCodes.java:163)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:598)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:696)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1014)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:417)
at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:390)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:271)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)

My jsp is having
<layout:form action="/errorCodes" reqCode="update" styleClass="PANEL">
<layout:row>
<layout atagrid property="datagrid" selectionAllowed="true" multipleSelectionAllowed="false" model="datagrid">
<layout atagridColumn title="ErrorCode" property="errCode" />
<layout atagridColumn title="Description" property="errDescription" />
<layout atagridColumn title="Error Group" property="errGroup" />
<layout atagridColumn title="Error Level" property="errLevel" />
</layout atagrid>
<layout:column>
<layout:submit reqCode="update">Save</layout:submit>
</layout:column>
</layout:row>
</layout:form>

Action class is having update method as

public ActionForward update(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse reponse) {
try {
HttpSession session = request.getSession(true);
String validuser = (String) session.getAttribute("validuser");
String userID =((String) session.getAttribute("userID")).trim().toUpperCase();
if (validuser == null) {
System.out.println("not valid user");
return (mapping.findForward("login"));
}
DatagridForm lc_form = (DatagridForm) form;

ErrorCodesDAO[] errAllBeanList = null;
ErrorCodesSQLCaller errSQLCaller = new ErrorCodesSQLCaller();
errAllBeanList = errSQLCaller.getAllError();
List list = Arrays.asList(errAllBeanList);

// Create a datagrid.
Datagrid lc_datagrid = Datagrid.getInstance();
lc_datagrid.setDataClass(ErrorCodesDAO.class);
// Set the data
lc_datagrid.setData(list);

lc_form.setDatagrid(lc_datagrid);
}catch (Exception e) {
}
return (mapping.findForward("errorCodes"));
}

My Form is

public class DatagridForm extends ActionForm {

private Datagrid datagrid;

public void setDatagrid(Datagrid in_datagrid){
datagrid = in_datagrid;
}

public Datagrid getDatagrid(){
return datagrid;
}

}

My Struts-config is having

<form-bean name="datagridForm" type="com.dcx.tax.sabrix.forms.DatagridForm">
</form-bean>

<action name="datagridForm" validate = "false" parameter = "reqCode" path="/errorCodes" scope="session" type="com.dcx.tax.sabrix.actions.ErrorCodesAction">
<forward name="errorCodes" path="/errorCodes.jsp">
</forward>
</action>

I am calling the action from menu.jsp like

<A href="errorCodes.do?reqCode=update">
</A>

Thank you,
Thilothama
 
author & internet detective
Posts: 40801
829
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thilothama,
It looks like the jar containing RequestUtils is not in your runtime classpath.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic