worse thing about JSP formatting

Discussion in 'Java' started by Neil Zanella, Jul 4, 2003.

  1. Neil Zanella

    Neil Zanella Guest

    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
     
    Neil Zanella, Jul 4, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul

    Better or worse mouse trap?

    Paul, Feb 15, 2004, in forum: ASP .Net
    Replies:
    10
    Views:
    572
  2. =?Utf-8?B?amhpbGw=?=
    Replies:
    0
    Views:
    380
    =?Utf-8?B?amhpbGw=?=
    May 13, 2004
  3. NamFu
    Replies:
    3
    Views:
    344
    Andrew Thompson
    Apr 27, 2004
  4. Steve Forrester
    Replies:
    2
    Views:
    864
    kayodeok
    Sep 13, 2003
  5. Zam
    Replies:
    1
    Views:
    257
    Mark Schupp
    Mar 14, 2005
Loading...

Share This Page