tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Korthof ...@apache.org>
Subject Re: Tomcat bug
Date Sat, 03 Jun 2000 23:40:20 GMT
The good (and bad) thing about JSPs is that they allow you to use the full
power of the Java language.  That also means that when you write Java
code, you're restricted to valid Java statements.

This is not a valid Java statement:

	char c = '\u000d';

because the '\u000d' is not a valid character constant.

I'm not entirely sure what it is you wanted to express, but whatever it
was, this isn't a valid way to do it.  Try compiling a .java file with
this, and you'll see what I mean.

The error shown below comes from a java compiler (it looks like javac's
description, though a different compiler might produce the same text), not
tomcat ... this is a bug either in your code (most likely) or in the
compiler (less likely, since both javac and jikes dislike this statement).

good luck --

Ed

On Sat, 3 Jun 2000, Jan Labanowski wrote:

> I am still using 3.1b1 Apache 1.3.12
> There is an annoying bug:
> 
> the JSP page: ( you cannot get much shorter than that)
> 
> <%@ page language="java" %>
> <% char ch  = '\u000e'; %>
> <HTML>
> Hello World
> </HTML>
> 
> Prints
>   Hello World 
> in the browser. If I change e -> d in char constant, i.e.:
> 
> <%@ page language="java" %>
> <% char ch  = '\u000d'; %>
> <HTML>
> Hello World
> </HTML>
>  
> I get:
> 
> Error: 500
> 
> Location: /SciPortal/CCM/CT/GAUSSIAN/test.jsp
> 
> Internal Servlet Error:
> 
> org.apache.jasper.JasperException: Unable to compile class for JSPwork/localhost_8080%2FSciPortal/_0002fCCM_0002fCT_0002fGAUSSIAN_0002ftest_0002ejsptest_jsp_3.java:61:
Invalid character constant.
>                  char ch  = '\u000d'; 
>                             ^



Mime
View raw message