No action instance for path /foobar could be created
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.