Bug 20674

Summary: Tomcat is not compliant with the JSP 1.2 specification.
Product: Tomcat 4 Reporter: kifoza <sopel>
Component: Jasper 2Assignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED WORKSFORME    
Severity: normal CC: thanuj_sc
Priority: P3 Keywords: ErrorMessage
Version: 4.1.24   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
URL: http://none.right.now

Description kifoza 2003-06-11 09:00:18 UTC
Hello,

As:
http://java.sun.com/products/jsp/syntax/1.2/syntaxref1210.html#15653
says:
The page directive applies to an entire JSP page and any of its static include 
files, which together are called a translation unit. A static include file is a 
file whose content becomes part of the calling JSP page. The page directive does 
not apply to any dynamic resources; see <jsp:include> for more information. 

Yet, if we have page a.jsp and page b.jsp, a.jsp being:
----- begin a.jsp
<%@ page pageEncoding="ISO-8859-2" contentType="text/html;charset=ISO-8859-2"%>
<%@ include file="b.jsp"  %>
<some native chars (iso-8859-2)>
---- end a.jsp

and b.jsp being:
---- begin b.jsp
<some native chars (iso-8859-2)>
---- end b.jsp

The native chars in b.jsp ARE NOT displayed correctly (only the ones in a.jsp 
are displayed correctly).

I hope this is fixed once and for all in an upcoming tomcat release, please 
notify me of the fix.
Comment 1 Eric Carmichael 2003-08-09 05:58:57 UTC
*** Bug 20675 has been marked as a duplicate of this bug. ***
Comment 2 thanuj kumar 2003-08-18 11:18:54 UTC
There is problem in running the Jsp Tag files after removing the JSPC generated 
servlet-mappings and directly accessing the JSP file in Tomcat5.0.7

java.lang.IllegalArgumentException: -52
	org.apache.jasper.compiler.SmapStratum$LineInfo.setOutputLineIncrement
(SmapStratum.java:124)
Comment 3 Eric Carmichael 2003-08-18 14:12:19 UTC
IllegalArgumentException in setOutputLineIncrement() is Bugzilla Bug 22277, 
and is fixed in CVS.  Also I'm resetting the field values for this bug report 
to their previous values, as Bugzilla Bug 22277 is not related to this one.
Comment 4 Mark Thomas 2004-05-17 20:35:20 UTC
This works for me with the latest version of TC4 from CVS.