Hi,

I have a problem that could be a bug somewhere inside the JSP compiler. I have ported 
an application from JRun 3.0 to TOMCAT. The following code inside a JSP causes an 
Exception:

---- snip ----
        <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
        <!--
        if (isMenu) 
        {
        <% 
                if (UserRole.compareTo("Echnaton Administrator") == 0) // 
Administrators with full access
                        out.print("document.write(\"<SCRIPT LANGUAGE='JavaScript1.2' 
SRC='/Echnaton/Scripts/hierArrays_Admin.js'><\/SCRIPT>\");");
                else if (UserRole.compareTo("Echnaton Technician") == 0) // Technical 
Users
                        out.print("document.write(\"<SCRIPT LANGUAGE='JavaScript1.2' 
SRC='/Echnaton/Scripts/hierArrays_Tech.js'><\/SCRIPT>\");");
                else
                        out.print("document.write(\"<SCRIPT LANGUAGE='JavaScript1.2' 
SRC='/Echnaton/Scripts/hierArrays_User.js'><\/SCRIPT>\");");
        %>
        }
        //-->
        </SCRIPT>

---- snip ----------------


Jasper reports the following exception:


org.apache.jasper.JasperException: Unable to compile class for JSP

An error occured between lines: 141 and 148 in the jsp file: /Header.jsp

Generated servlet error:
C:\JavaSoft\Tomcat4.0\work\localhost\Echnaton\Header$jsp.java:209: Invalid escape 
character.
                                        out.print("document.write(\"<SCRIPT 
LANGUAGE='JavaScript1.2' SRC='/Echnaton/Scripts/hierArrays_Admin.js'><\/SCRIPT>\");");
                

Exactly this code works perfectly fine in JRun! It seems like the parser could not 
handle the escaped quotation mark in the document.write() method. Could anybody help? 
I am currently working with Tomcat 4.0.1. I have downloaded the binaries only (for M$ 
Windows).

Many thanks!!

Thomas


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to