Meaningless Drivel is fun!*
The moose likes Struts and the fly likes 500 Internal Server Error with passing wrong parameter in action of struts 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "500 Internal Server Error with passing wrong parameter in action of struts 2.0" Watch "500 Internal Server Error with passing wrong parameter in action of struts 2.0" New topic
Author

500 Internal Server Error with passing wrong parameter in action of struts 2.0

yatin baraiya
Ranch Hand

Joined: Jul 17, 2012
Posts: 30
hi all

my working environment is below
jsp,struts 2.0,java ,I will also use the interceptor

My issue is that when i fire below url in browser

here i inform that Id is integer type variable in my struts action class.

https://test123.local.com/test123/test.action?id=9

it works fine

but when i fire the same url with updating 9 to 9'

https://test123.local.com/test123/test.action?id=9'

give me the following exception in console and nothing will be displayed in the browser.

SEVERE: Servlet.service() for servlet default threw exception Infinite recursion detected:

and as per checking in FF fire-burg tool display me the 500 Internal Server Error.

anybody have idea ,how do i prevent this type of error, I need to catch this error in exception and want to redirect the users to access restricted page.

And one more point i want something generic solutions for it, not wan to specific solutions for it.

Let me know if you wan to any other information

Thanks & Regards
Yatin Baraiya

yatin baraiya
Ranch Hand

Joined: Jul 17, 2012
Posts: 30
hi all

here i have also mentioned with the more detail for the above issue.

as per the below given url

https://test123.local.com/test123/test.action?id=9'

my struts-admin.xml entry as like below




So here my customStack interceptor call first




as per debugging the above code i found that my interceptor will not call my "handled" name action and throws the exception as per given below:

Infinite recursion detected: [//test!test, //handled, //handled] - [unknown location]
at com.opensymphony.xwork2.ActionChainResult.execute(ActionChainResult.java:207)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

let me know if you want to other information
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 500 Internal Server Error with passing wrong parameter in action of struts 2.0