Results 1 to 5 of 5
  1. #1
    newakdev is offline Member
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Question JSTL and HTML White space

    Need some help...

    I have a JSP page with JSTL code. The JSTL formatting is being carried over to the html page and causing performance issues because of the size.

    sample jstl code...

    for each loop
    if statement

    more if statements

    end loop

    The loop can be processed 1 to 150 times. The page that is displayed grows very large because of the white space produced in the HTML.

    Any ideas on how the suppress the white space? I'm digging into server compile options now just wondered if I could do anything in the jsp page.

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    Can u find anything useful in java src code of JSP after it is compiled
    on servlet container.

    On Tomcat servlet container there is folder
    ...work\Catalina\projcet_name\.....
    and there are src files of JSP,
    if you use other you will find it easily.

    Inside there are many lines like:

    Java Code:
    out.write("    <h1>JSP 2.0 Expression Language - Basic Arithmetic</h1>\n");
    out.write("    <hr>\n");
    out.write("    This example illustrates basic Expression Language arithmetic.\n");
    out.write("    Addition (+), subtraction (-), multiplication (*), division (/ or div), \n");
    There you can search for problematic html tags .

    Can this help?

  3. #3
    newakdev is offline Member
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Smile

    FON, Thanks for the reply.

    I was able to determine it was a setting in the application server setup. I had to enable the JSP Compiler option "useCDataTrim".

  4. #4
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    368
    Rep Power
    5

    Default

    great!

    which app server is that by way

  5. #5
    newakdev is offline Member
    Join Date
    Feb 2010
    Posts
    3
    Rep Power
    0

    Default

    It is a Websphere Commerce App running on Websphere Application Server

Similar Threads

  1. How to display a String that contains more than one white spaces
    By thachun in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 09-27-2009, 09:16 AM
  2. [SOLVED] remove all white space from text file
    By loki in forum New To Java
    Replies: 10
    Last Post: 04-26-2009, 11:52 AM
  3. display histogram that count white pixels
    By TamTam in forum Java 2D
    Replies: 6
    Last Post: 02-14-2009, 09:26 PM
  4. BufferStrategy and white rows of pixels
    By TobyLobster in forum Java 2D
    Replies: 2
    Last Post: 12-29-2008, 01:49 PM
  5. White Space Issue
    By sibythoma1984 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-22-2008, 12:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •