Results 1 to 5 of 5
Thread: JSTL and HTML White space
- 02-23-2010, 03:02 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 3
- Rep Power
- 0
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.
- 02-23-2010, 11:49 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
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:
There you can search for problematic html tags .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");
Can this help?
- 02-24-2010, 02:09 PM #3
Member
- Join Date
- Feb 2010
- Posts
- 3
- Rep Power
- 0
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".
- 02-24-2010, 02:19 PM #4
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
great!
which app server is that by way
- 02-24-2010, 05:54 PM #5
Member
- Join Date
- Feb 2010
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
How to display a String that contains more than one white spaces
By thachun in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 09-27-2009, 09:16 AM -
[SOLVED] remove all white space from text file
By loki in forum New To JavaReplies: 10Last Post: 04-26-2009, 11:52 AM -
display histogram that count white pixels
By TamTam in forum Java 2DReplies: 6Last Post: 02-14-2009, 09:26 PM -
BufferStrategy and white rows of pixels
By TobyLobster in forum Java 2DReplies: 2Last Post: 12-29-2008, 01:49 PM -
White Space Issue
By sibythoma1984 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 04-22-2008, 12:05 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks