• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts-config.xml action forward question

 
neetu shri
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Michael Ku
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What evidence do you have that it goes directly to where you say it goes?
 
neetu shri
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have inserted some debugging satements to see the flow.
 
Michael Ku
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the 2 actions. remember to use code tags
 
Brent Sterling
Ranch Hand
Posts: 948
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic