Solved

Servlet generated Javascript code

Posted on 2002-05-29
3
241 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 27

Accepted Solution

by:
rrz earned 500 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now