This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Struts 2 - Chain Result Type

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when user hit this url

http://localhost:9082/Template/com/example/web/employee/processEmployee!selectEmployee.action?employeeForm.employee.id=103

selectEmployee method gets called

after that i am chaining to another action

i get the below error



please help me. please see the below config. thanks in advance



 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Action chaining is *strongly* discouraged.

Why is the namespace of you package a slash-separated package name?! That's pretty awkward on the browser side, no?

What does the config-browser plugin think your configuration is? I don't think you need the action extension.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply

David Newton wrote:Action chaining is *strongly* discouraged.


Please let me know why my code doesn't works.

David Newton wrote:Why is the namespace of you package a slash-separated package name?! That's pretty awkward on the browser side, no?


i have placed all my jsp under WEB-INF and i also use internalization
i believe that slash-separated package name is easier say
http://localhost:9082/Template/com/common/login/login.jsp.action
looks for
jsp in /WEB-INF/com/common/login/login.jsp and
properties in com/common/login/LoginAction_en.properties

David Newton wrote:
What does the config-browser plugin think your configuration is? I don't think you need the action extension.


i didn't get what you are asking .

why i get 404 error message ? why my action is not forwarded ? please help me


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you used the config-browser plugin you'd probably be able to figure out why you're getting a 404. My first suggestion, as I said above, is to remove the ".action" from the chained mapping.

And again, action chaining is strongly discouraged.
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:If you used the config-browser plugin you'd probably be able to figure out why you're getting a 404. My first suggestion, as I said above, is to remove the ".action" from the chained mapping.

And again, action chaining is strongly discouraged.


thanks for your replay. you are right , after removing .action its working fine





 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot stress enough that action chaining is *strongly* discouraged--there is almost never, ever, a good reason to do it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic