infinite


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


my working environment is below
jsp,struts 2.0,java
And my issue is that
when i fire below url in browser
(1) https://test123.local.com/test123/test.action?id=9
it works fine
but when i fire the same url with updatin 9 to 9'
(2) https://test123.local.com/test123/test.action?id=9'
give me the following exception in console
SEVERE: Servlet.service() for servlet default threw exception
Infinite recursion detected:
and as per checking in FF fireburg tool display me the 500 Internal Server Error.
and body have idea to prevent this type of error, I need to catch this error in exception and want to redirect the users to access restricted page.
Here i mentioned more detail which i had found from my side.
as per the shown in (2) given url
my struts-admin.xml entry as like below
<action name="test" method="test" class="com.os.Environment.TestAction">
<interceptor-ref name="customStack">
</interceptor-ref>
<result>/jsp/user/tested.jsp</result>
<result name="passed" type="redirect-action">passed?Id=${Id}</result>
</action>
<interceptor-stack name="customStack">
<interceptor-ref name="chainStack"/>
<interceptor-ref name="myCustomCheck"/>
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="exception">
<param name="logEnabled">true</param>
<param name="logLevel">ERROR</param>
</interceptor-ref>
</interceptor-stack>
hence first of my customStack interceptor called
below is my custom interceptor code
public class myCustomCheck extends AbstractInterceptor
{
private String invoke(ActionInvocation invocation) throws Exception
{
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
return invocation.invoke(); //this line throw the exception
}
public String intercept(ActionInvocation invocation) throws Exception
{
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
return invoke(invocation);
}
}
i had debugging the above code , and i had 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

Related Links

Elastix: is there a way to setup a conference with infinite duration?
breaking down an expression into partial fractions
CodeNameOne InfiniteProgress Issue
Calculate Sum of Infinite Numbers Series [closed]
500 Internal Server Error with passing wrong parameter in action of struts 2.0
The number of DFA accept same language is countably infinite

Categories

HOME
livecode
qc
transactions
mousemove
plpgsql
jersey-2.0
drag-and-drop
fedora
slide
cname
sonata
webstore
sonicwall
reselect
gmp
xsl-fo
renderscript
cmake-gui
yii2-basic-app
sharedpreferences
maven-surefire-plugin
batch-rename
intel
backendless
multi-dimensional-scaling
points
sendmessage
javax.persistence
fusion
credit-card
matlab-app-designer
seafile-server
advanced-filter
bean-validation
cargo
export-to-pdf
flowchart
pyttsx
dbcc
liteide
libreoffice-writer
karabiner
watir-webdriver
gnome-terminal
portability
predicates
.when
google-shopping-api
finder
nitrousio
tablespace
nsdata
android-4.2-jelly-bean
yii2-model
polymerfire
flipclock
taco
wikimedia-commons
diawi
lovefield
godeps
android-mapview
largenumber
sqlbase
gluon-desktop
apple
wlanapi
fantom
modern.ie
darwin
phpredis
tree-structure
webproject
scala-swing
fat32
relationships
commenting
xmi
spring-social-linkedin
lsa
smips
delphi-xe4
semicolon
donut-chart
tfs-sdk
significant-digits
handshake
popup-blocker
pageheap
cakeyframeanimation
java.lang.class
trialware
kobold2d
platform-independent
series-40
memory-pool
botnet
tablet-pc
3-tier
browser-based
wmd-editor
fuzzy-comparison
index.dat
datagridcolumn
jboss-mdb
acceleration
rootkit
error-detection

Resources

Encrypt Message