Hi Hee!

You didn't provide enough information: what is the error message that you
are getting? is your JavaScript enclosed in <JAVASCRIPT> container?

I'll try to answer anyway:

Since you need the "<" to appear in the resulting HTML page, you can write:

if (a <%= "<" %> b) {

or even:

<%= "if (a < b) {" %>

The resulting servlet code will be:

out.println( "" + "<");

and

out.println( "" + "if (a < b) {");

respectively.

I did find that Jrun 2.2 has a problem with the <JAVASCRIPT> tag - it treats
the rest of the page as simple text!
The simplest solution is to use the same method here:

<%= "<JAVASCRIPT>" %>


Bye,

Amir
_________________
Amir Tocker
Amdocs - LD CSM

[EMAIL PROTECTED]
Phone: 972-705-7970
Pager: 214-814-2070 (numeric)
_________________





-----Original Message-----
From: Hee Meng [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 17, 1999 10:44 PM
To: [EMAIL PROTECTED]
Subject: Problem parsing "<" in JSP - Lexical error


Hi,

A javascript function in my jsp file causes a parse error (lexical
error). Here is
a snippet of the function :

if (a < b) {
  ...
}

The culprit is the "<" character. How should I deal with this so that
the jsp
can be parsed properly? I am using JRUN as the engine.

Thanks for any info.

Regards

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to