1 Reply Latest reply on Sep 10, 2004 6:04 PM by Chris Lamprecht

    JSP is generating blank lines at the beginning

    vmoreno Newbie

      Hello,
      I have some jsp generatting wml for mobiles.

      The problem is that the jsp generates blank lines at the begining of the
      generated page.

      How can I get ride of this blank lines?

      Thanks

      Victor

        • 1. Re: JSP is generating blank lines at the beginning
          Chris Lamprecht Newbie

          Use a servlet instead, where you can better control the output, or run your jsp tags all together on the same line (no newlines between them):

          <% // code here
          %><jsp:foobar.../>

          instead of on separate lines like:

          <% // code
          %>
          <jsp:foobar.../>

          Hmm another idea just popped in to my mind, you may be able to write a Filter that removes all leading whitespace from the output, and apply this filter to your JSPs. I haven't thought this one out...