tom_corc3
asked on
Servlet generated Javascript code
I have a servlet that generates HTML code that has embedded Javascript in it. This javascript code excutes normally most of the time but I use a javascript function that has a redirect call in it which fails. None of these javascript calls have been successful:
-document.location.href = 'http://javascriptsource.com';
-window.location='http://javascriptsource.com';
-self.location.href='http://javascriptsource.com';
The same calls execute correctly when the raw html page is used instead of sending it through a servlet.
All 3 result in the line "......../servlet/undefine d" appearing in the address line of the browser a stack trace and error entitled 'java.lang.ClassNotFoundEx ception: undefined' appearing in the main window.
Does anyone know a solution to this?
-document.location.href = 'http://javascriptsource.com';
-window.location='http://javascriptsource.com';
-self.location.href='http://javascriptsource.com';
The same calls execute correctly when the raw html page is used instead of sending it through a servlet.
All 3 result in the line "......../servlet/undefine
Does anyone know a solution to this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Interesting answer??
post a small compilable example that we can test.