You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/10/10 22:46:30 UTC

DO NOT REPLY [Bug 4085] New: - Error when using XML syntax for JSPs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4085

Error when using XML syntax for JSPs

           Summary: Error when using XML syntax for JSPs
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: Andreas.Junghans@fh-karlsruhe.de


If you feed the following JSP in XML format to Jasper, you get the result shown 
below.


-- simple.jsp ---------------------------------

<?xml version="1.0"?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">

<html>
	<body>
		a <jsp:expression>3+4</jsp:expression> b
	</body>
</html>

</jsp:root>

-----------------------------------------------


-- output -------------------------------------

<html >
	<body >7
		a  b
	</body>
</html>

-----------------------------------------------


It seems like Tomcat is using some kind of inverse polish parsing ;-) ?  Also, 
the start tags look strange with that trailing space. We've tried both the 
included JAXP parser and Xerces-J 1.4.3. Instead of <jsp:expression> you can 
also insert a custom action from a taglib and the "a" is still shifted behind.

Configuration: Win98, JDK 1.2.2, no jars in jre/lib/ext

Best regards

  Andreas Junghans (STZ-IDA, Karlsruhe, Germany)