tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Gaston Alvarez" <>
Subject syntax inside syntax
Date Fri, 25 May 2001 13:35:43 GMT
    I cannot find the original mail, so I am trying to remember.

    I remember that some time ago there was an error reported that when the
jsp compiled found something like

out.writeln( "....%>" );

it took the %> as a directive and not as part of the code.  (the end of the

    It was said that that should get fixed, but I dont think so.

    To correct this means to check if in the scriptlet the java syntax is
correct and doing so adds lots of time and complexity. Also in the jsp
specification (been reading 1.2) it says that it should be scaped as %\>.
See page 42 of jsp 1.2 section 2.6 public draft 2. Also see page 58 section

The correct answer should be:
out.writeln( "....%\>" );

    I aslo means a problem because in the future we may support another
language like Jython (Python) and complexity grows.

    Well, we are facing the problem of having a syntax inside another
syntax. We should then not consider this an error and encourage the
programmer to take another path of action. Anyway, I consider that taking
diferents scape sequences together (jsp+java) a little messy.

posible solutions:

out.writeln( "....\u####>" );  // sorry, dont remember the number.
out.writeln( "....%"+">" );



View raw message