Hi,
I'm getting a stack overflow when I submit a login form.
I know Java, but I don't know even basic JSP stuff and Javascript.
When I do loginForm.submit();, I can follow it going to WebWindow.getResponse(request), which calls requestContext.runScripts(), which calls WebWindow.getResponse(request) again, etc.
The request is of this form (request.toString()):
GET request for (http://host:12000/IsAdmin/treefrmbase.jsp#current) #current
The body of treefrmbase.jsp is:
<BODY text="#000000" link="#000000" vlink="#000000" alink="#000000"
onload="javascript:window.location.href='#current'">
<uji:include pane="menu"/>
I have tried to follow it in the debugger, but I don't understand what is happening and why. Both HttpUnit and HtmlUnit get stuck here, while it works fine in IE and Firefox, so I suppose it is a Rhino bug or JSP/Javascript problem.
All I want is to get passed this, I cannot change the JSP/Javascript other than for testing. Is there some flag I can set to prevent this looping, or a good way to find out where this page is pointing at itself? Am I even looking in the right place?
I'll include the reiterating stacktrace just in case:
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
at com.meterware.httpunit.WebResponse$Scriptable.setLocation(WebResponse.java:759)
at com.meterware.httpunit.javascript.JavaScript$Window.setLocation(JavaScript.java:421)
at com.meterware.httpunit.javascript.JavaScript$Location.jsSet_href(JavaScript.java:656)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
at org.mozilla.javascript.ScriptableObject.setBySetter(ScriptableObject.java:1655)
at org.mozilla.javascript.ScriptableObject.put(ScriptableObject.java:239)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put(JavaScript.java:273)
at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:1347)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1430)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1420)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2753)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:172)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:56)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:689)
at com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java:89)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(JavaScriptEngineFactory.java:58)
at com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm getting a stack overflow when I submit a login form.
I know Java, but I don't know even basic JSP stuff and Javascript.
When I do loginForm.submit();, I can follow it going to WebWindow.getResponse(request), which calls requestContext.runScripts(), which calls WebWindow.getResponse(request) again, etc.
The request is of this form (request.toString()):
GET request for (http://host:12000/IsAdmin/treefrmbase.jsp#current) #current
The body of treefrmbase.jsp is:
<BODY text="#000000" link="#000000" vlink="#000000" alink="#000000"
onload="javascript:window.location.href='#current'">
<uji:include pane="menu"/>
<uji:windowControl />
<SCRIPT language="JavaScript"><!--
window.top.isadmin_pageid = <% out.print(IsAdminSession.getPageID(session)); %>;
--></SCRIPT>
</BODY>
I have tried to follow it in the debugger, but I don't understand what is happening and why. Both HttpUnit and HtmlUnit get stuck here, while it works fine in IE and Firefox, so I suppose it is a Rhino bug or JSP/Javascript problem.
All I want is to get passed this, I cannot change the JSP/Javascript other than for testing. Is there some flag I can set to prevent this looping, or a good way to find out where this page is pointing at itself? Am I even looking in the right place?
I'll include the reiterating stacktrace just in case:
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)
at com.meterware.httpunit.WebResponse$Scriptable.setLocation(WebResponse.java:759)
at com.meterware.httpunit.javascript.JavaScript$Window.setLocation(JavaScript.java:421)
at com.meterware.httpunit.javascript.JavaScript$Location.jsSet_href(JavaScript.java:656)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:174)
at org.mozilla.javascript.ScriptableObject.setBySetter(ScriptableObject.java:1655)
at org.mozilla.javascript.ScriptableObject.put(ScriptableObject.java:239)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.put(JavaScript.java:273)
at org.mozilla.javascript.ScriptableObject.putProperty(ScriptableObject.java:1347)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1430)
at org.mozilla.javascript.ScriptRuntime.setObjectProp(ScriptRuntime.java:1420)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2753)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140)
at com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(JavaScript.java:172)
at com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelegate.java:56)
at com.meterware.httpunit.WebResponse$Scriptable.load(WebResponse.java:689)
at com.meterware.httpunit.javascript.JavaScript.load(JavaScript.java:89)
at com.meterware.httpunit.javascript.JavaScriptEngineFactory.load(JavaScriptEngineFactory.java:58)
at com.meterware.httpunit.RequestContext.runScripts(RequestContext.java:44)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:122)