-1

I am not able to make modues in struts.my web.xml configuration file contains the below configuration :

web.xml

       <init-param>
        <param-name>config/admin</param-name>
        <param-value>/WEB-INF/config/struts-config-admin.xml</param-value>
    </init-param>

and my action configuraion in struts-config-admin.xml is

    <action path="/userAdminAction"          type="com.admin.UserAdminAction"
         ............
     </action>

JSP : searchLayout.jsp

<html:html>
     <html:form action="admin/userAdminAction.do" method="get">
        ..............
        ..............
        .............. 
         submit button to submit the form
    </html:form>

I am calling the jsp from the address bar using the url http://localhost/snpapp/admin/searchLayout.jsp

but I am getting following exception stack trace: t cause of ServletException.

      servlet.jsp.JspException: Cannot retrieve mapping for action: "/admin /userAdminAction"
     at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:840)

at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:467) at jsp_servlet._lrd.search._searchLayout.jsp_tag7(__searchLayout.java:438)

I tried with different actions (Ex :action="/userAdminAction" or action="userAdminAction.do") in jsp's form action but it is not working for modules.

Please give me some idea. how can i achive struts moduels should work for forms ?

Satya
  • 8,146
  • 9
  • 38
  • 43

1 Answers1

0

I think it should be admin/UserAdminAction instead of admin/userAdminAction, or your type parameter should be type="com.admin.userAdminAction". Struts is case-sensitive

RanRag
  • 48,359
  • 38
  • 114
  • 167
  • But my struts-config action is "userAdminAction" only.And it is wokring for without modules. but we are refactoring the code and making modues. so while making modularization jsp's html:form is giving the error. – Satya Jan 02 '12 at 11:48
  • I am sorry I think I completely misunderstood your question. – RanRag Jan 02 '12 at 12:09