Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Servlet generated Javascript code

Posted on 2002-05-29
3
Medium Priority
?
282 Views
Last Modified: 2013-11-24
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/undefined" appearing in the address line of the browser a stack trace and error entitled 'java.lang.ClassNotFoundException: undefined' appearing in the main window.
Does anyone know a solution to this?
0
Comment
Question by:tom_corc3
3 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 2000 total points
ID: 7041905
Please post your code.  
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 7042626
what's your OS/browser/Java version ?

post a small compilable example that we can test.
0
 
LVL 92

Expert Comment

by:objects
ID: 7045614
Interesting answer??
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question