Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Problem in Struts 2 - Chain Result Type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in Struts 2 - Chain Result Type" Watch "Problem in Struts 2 - Chain Result Type" New topic
Author

Problem in Struts 2 - Chain Result Type

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 29, 2009
Posts: 70
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 29, 2009
Posts: 70
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

Joined: Sep 29, 2008
Posts: 12617

I cannot stress enough that action chaining is *strongly* discouraged--there is almost never, ever, a good reason to do it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Struts 2 - Chain Result Type
 
Similar Threads
JSP and Class member question
Forward - Servlet Action unavailable
In struts2 delete is not Working
Struts2 newbie - HTTP Status 404 - No result defined for action authentication.User and result SUCCE
Runing an example struts application