aspose file tools*
The moose likes Struts and the fly likes struts-config.xml action forward question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts-config.xml action forward question" Watch "struts-config.xml action forward question" New topic
Author

struts-config.xml action forward question

neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
I have following snippets:

struts-config.xml:



struts-actions.xml:



When I enter the URL http://localhost/customer/schedule/appt.do?id=1234, the request directly goes to org.xyz.web.portlets.customer.scheduleappointment.DispatchViewAction. Why does not the request go to org.xyz.web.portlets.customer.scheduleappointment.SelectApptAction?

What am I doing wrong? SHoudn't the requests with URI customer/schedule/appt.do go to the action class SelectApptAction.java? My SelectApptAction.java has a mapping.findForward("success"); statement.

Per my understaing any request to customer/schedule/appt is processed by SelectAppAction.java and forwarded to /customer/schedule/view which is handled by DispatchViwAction.
and


thanks


SCJP 1.2<br />SCWCD
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
What evidence do you have that it goes directly to where you say it goes?
neetu shri
Greenhorn

Joined: Aug 14, 2007
Posts: 17
I have inserted some debugging satements to see the flow.
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
Please post the 2 actions. remember to use code tags
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I am confused by your mappings. You do not have a class specified for your actions (type). I am not sure what the file struts-actions.xml is used for, but you have what look to be Action classes defined as beans. What version of Struts are you using?

- Brent
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts-config.xml action forward question