Hi Lance,

You need to escape the double-quote in the string assigned to the "newimage"
object also, consider using "toUpperCase() as follows...

                        if(file.toUpperCase().endsWith(".HTML"))
                         {
                           newimage="<img src=\"/images/icon_ie.gif\">";
                         }

Best Regards!

Mike Cronin

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Lance
Prais
Sent: Monday, April 29, 2002 9:24 AM
To: [EMAIL PROTECTED]
Subject: Syntax error question


I am getting a syntax error with the following code and not sure what the
problem is:

                        if(file.endsWith(".html") || file.endsWith(".HTML"))
                         {
                           newimage="<img src="/images/icon_ie.gif">";
                         }
Error message:
Unable to compile class for
JSP/usr/local/netscape/server4/https-kb-dev/config/../ClassCache/_jsps/_resu
lts_jsp.java:504: ';' expected.
                                 newimage="";

I am ending the line with ";"

Thanks
Lance

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to