Solved

Servlet generated Javascript code

Posted on 2002-05-29
3
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
spring jars download 1 52
How to execute a Python program and gather return output in Java 2 49
ejb stateless example 2 40
Website checklist for browser compatibility? 2 37
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

762 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