Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > No action instance for path /foobar could be created

Reply
Thread Tools

No action instance for path /foobar could be created

 
 
crash.test.dummy
Guest
Posts: n/a
 
      08-15-2006
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/personVi...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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rails: Will controller obj be created (re-created) each time an action is called sayoyo@yahoo.com Ruby 1 11-24-2005 11:41 PM
Struts Forward to an Action from an to Action and URLs rjweytens Java 6 06-25-2004 01:49 PM
How to check if a path *could* be a legal path? Maciej Sobczak Python 9 04-24-2004 11:12 PM
STRUTS - No action instance for path /logoff could be created Hari Om Java 1 10-08-2003 02:53 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments