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 2008/05/29 16:52:46 UTC
DO NOT REPLY [Bug 45096] New: Jasper compiler collapses script end
tag into start tag
https://issues.apache.org/bugzilla/show_bug.cgi?id=45096
Summary: Jasper compiler collapses script end tag into start tag
Product: Tomcat 6
Version: 6.0.16
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: c.beckey@comcast.net
Given: a script element within the head element within a JSP document, which
includes a src attribute and no body
(e.g. <script type="text/javascript" src="../script/menu.js"></script>)
Jasper compiles to: a single script element with the end delimiter included
(e.g. out.write("<script src=\"../script/menu.js\"
type=\"text/javascript\"/>"); )
which results in the following in the emitted HTML
(e.g. <script src="../script/menu.js" type="text/javascript"/>)
According to the specification for HTML 4, the end element is required.
See http://www.w3.org/TR/REC-html40/interact/scripts.html
i.e. the output HTML should be:
<script src="../script/menu.js" type="text/javascript"></script>
Firefox 3 RC1 will not display the page without the end element.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 45096] Jasper compiler collapses script end tag
into start tag
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45096
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> 2008-05-29 14:17:49 PST ---
JSP Documents are intended to produce dynamic XML content. What you are seeing
is a side-effect of this.
If you set the content type to "application/xhtml+xml" then <script
src="../script/menu.js" type="text/javascript"/> will work as expected with
Firefox 3 RC1.
If you set the content type to "text/html" then you must be mindful of
http://www.w3.org/TR/xhtml1/#guidelines and take any necessary steps which
includes making sure your xml document outputs <script ...></script> rather
than <script .../>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org