No action instance for path /foobar could be created

Discussion in 'Java' started by crash.test.dummy, Aug 15, 2006.

  1. I have these classes:

    =========================================
    samples.test.ListAction.java

    public class ListAction extends DispatchAction {
    public ActionForward init(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) throws
    Exception {...}
    ....
    }

    =========================================
    samples.app.struts.PersonViewAction.java

    public class PersonViewAction extends ListAction {
    public ActionForward init(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) throws
    Exception {...
    ...
    return super.init(mapping, form, request, response);
    }
    ....
    }

    =========================================
    samples.app.struts.PersonViewActionForm.java

    public class PersonViewActionForm extends ActionForm {
    ....
    }

    =========================================
    struts-config.xml

    <form-beans>
    <form-bean name="personViewActionForm"
    type="samples.app.struts.PersonActionForm"/>
    </form-beans>

    <action-mappings>
    <action path="/personViewAction"
    type="samples.app.struts.PersonViewAction"
    name="personViewActionForm"
    scope="request"
    input="/searchPage.jsp"
    parameter="method">
    <forward name="success" path="/resultsPage.jsp" />
    </action>

    =========================================

    running this app with URL (i am using weblogic v8.1):

    http://localhost/myTestPage/personViewAction.do?method=init

    causes this error

    ERROR~org.apache.struts.action.RequestProcessor~ No action instance
    for path /personViewAction could be created


    However, when I make PersonViewAction extend DispatchAction directly,
    everything works fine.

    Any reason why I cannot extend the PersonViewAction with ListAction and
    still make things work just fine?


    I checked the .war file and and the classes are properly located:
    /WEB-INF/classes/samples/test/ListAction.class
    /WEB-INF/classes/samples/app/struts/PersonViewAction.class

    I'm trying to handle pagination in ListAction so pages that needs
    pagination will just have their Action classes extend from ListAction
    (and not repeat the logic over and over again).

    any help is appreciated.
    thanks.
     
    crash.test.dummy, Aug 15, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    0
    Views:
    490
  2. Hari Om
    Replies:
    1
    Views:
    28,370
    Wendy S
    Oct 8, 2003
  3. Dave Kuhlman
    Replies:
    15
    Views:
    553
    Bruno Desthuilliers
    Mar 14, 2008
  4. Replies:
    1
    Views:
    157
    James Britt
    Nov 24, 2005
  5. EugeneE
    Replies:
    0
    Views:
    168
    EugeneE
    Apr 9, 2014
Loading...

Share This Page