hi,
you can put the javascript code into a seperate
file and ask the browser to load it.
ie, in your html file you can put
<html>
<script language="javascript" src="yourscript.js">
</script>
In this way, the jsp compiler will not look into
your javascript code.
regards
Nagaraj
--- Lingamarla Giri <[EMAIL PROTECTED]> wrote:
> Platform: AIX, NES 3.0, ServletExec 2.2, JSP 1.0,
> Servlet 2.1, Netscape 4.5
>
> We have a problem with one of our JSPs. We have a
> JSP file (~24K) ,
> which has a lot of JavaScript for pop-up menus and
> validations.
> In some instances, the HTML generated by this JSP
> has line breaks in the
> middle of HTML/JavaScript lines. This results in
> various JavaScript errors
> and messed up presentation. For instance code like:
>
> <S
>
> TYLE TYPE="text/css">
>
> When we look at the generated Servlet, we see the
> following.
>
> out.print( "\n
> document.writeln(\"><\\/SCRIPT>\");\n
> document.writeln
> (\"<SCRIPT LANGUAGE='JavaScript1.2'
>
SRC='/ps/partcls/prep/hierMenus.js'><\\/SCRIPT>\");\n
> }\n\n//-->
> \n</SCRIPT>\n\n</HEAD>\n\n\n<!--*******
>
********************************************************************\n
> CSS definations for the Menu\n******************
>
*********************************************************-->\n<STYLE
> TYPE
> =\"text/css\">\n\n all.SCREENS\n {\n
> font-color:lightgrey;\n
> font-size:9pt;\n
> font-style:normal;\n font-weight:bold;\n
> text-align:center;\n/*
> background-color:lightgrey;*/\n
> text-decoration:none;\n
> margin-left:1;\n margin-right:1;\n
> border-color:lightgrey;\n
> border-style:outset;\n/*
> border-width:1pt; */\n padding:1;\n
> }\n\n</STYLE>\n\n\n<BODY BGCOLOR=\"midnightblue\"
> LINK=\"lightgrey\">
> \n<FONT FACE=\"Arial\" SIZE=3
> COLOR='lightgrey'>User:<B>" );
>
> Surprising thing was, some out.print lines are huge
> (over 10K) while others
> are just one line. The generate HTML has line breaks
> occuring at various
> parts of the code and at random.
>
> I would appreciate if you can answer the following
> questions.
> How does the translator decides on line size?
> What is causing these line breaks?
> How to fix this problem?
>
>
>
> TIA
>
> Giri Lingamarla
>
>
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets