J
jsguru72
In my JSP document, I have the following script element defined.
<script type='text/javascript' src='/include/scripts/menu-
row.js'> </script>
Yet, when I load the page in a browser and view the page source I get
the following.
<script type='text/javascript' src='/include/scripts/menu-
row.js'/>
Since the script element does not support the inline syntax,
everything after this element is interpreted as a script instead of
how it should be.
I am using Tomcat 6.0.18
Here is the full JSP document.
----------
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root version="2.1"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/>
<html>
<head>
<script type='text/javascript' src='/include/scripts/menu-
row.js'> </script>
</head>
<body>
Random text
</body>
</html>
</jsp:root>
----------
This is the output when I view the page source in a browser.
----------
<html>
<head>
<script src="/include/scripts/menu-row.js" type="text/
javascript"/>
</head>
<body>
Random text
</body>
</html>
----------
Does anyone have any idea where this conversion from the <script></
script> syntax to the <script/> syntax is being done and why?
Thanks
<script type='text/javascript' src='/include/scripts/menu-
row.js'> </script>
Yet, when I load the page in a browser and view the page source I get
the following.
<script type='text/javascript' src='/include/scripts/menu-
row.js'/>
Since the script element does not support the inline syntax,
everything after this element is interpreted as a script instead of
how it should be.
I am using Tomcat 6.0.18
Here is the full JSP document.
----------
<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root version="2.1"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/>
<html>
<head>
<script type='text/javascript' src='/include/scripts/menu-
row.js'> </script>
</head>
<body>
Random text
</body>
</html>
</jsp:root>
----------
This is the output when I view the page source in a browser.
----------
<html>
<head>
<script src="/include/scripts/menu-row.js" type="text/
javascript"/>
</head>
<body>
Random text
</body>
</html>
----------
Does anyone have any idea where this conversion from the <script></
script> syntax to the <script/> syntax is being done and why?
Thanks