N
Neil Zanella
Hello,
The worse thing about using JSP for formatting HTML/XHTML documents is that when
a bunch of directives are present such as the following,
<%@ page contentType="text/xml" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
the newline characters after each %> are sent to the web browser
as well. As a rsult it becomes hard to write neat looking JSP pages
without having the HTML/XHTML output contain a whole bunch of blank
lines (which can be seen with the browser's View -> Page Source feature.
On the other hand other server side processing mechanisms such as
PHP with its <?php /* ... */ ?> tag mechanism have the property that,
AFAIK, if a newline follows the ?> then it is also stripped from the
output sent to the browser.
I wonder if future versions of JSP couldn't do the same!
Regards,
Neil
The worse thing about using JSP for formatting HTML/XHTML documents is that when
a bunch of directives are present such as the following,
<%@ page contentType="text/xml" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
the newline characters after each %> are sent to the web browser
as well. As a rsult it becomes hard to write neat looking JSP pages
without having the HTML/XHTML output contain a whole bunch of blank
lines (which can be seen with the browser's View -> Page Source feature.
On the other hand other server side processing mechanisms such as
PHP with its <?php /* ... */ ?> tag mechanism have the property that,
AFAIK, if a newline follows the ?> then it is also stripped from the
output sent to the browser.
I wonder if future versions of JSP couldn't do the same!
Regards,
Neil