worse thing about JSP formatting

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top