Is anyone familiar with a technique for removal of whitespace that results from the use of tag libraries such as JSTL? I know that you can do this in Tomcat via a trimSpaces
initialization parameter, but does anyone have similar experience doing this type of thing within WebSphere App Server?
Asked
Active
Viewed 3,620 times
2

Eddie
- 53,828
- 22
- 125
- 145

adamrice32
- 163
- 1
- 2
- 8
-
What are you trying to achieve? Increase html source readability or reduce html page size? – cherouvim Mar 04 '09 at 20:45
2 Answers
3
If you're using version 2.1 or later of the JSP spec, you can simply include the following directive in your JSP, which will strip out whitespace before sending the resultant payload over the wire:
<%@ page trimDirectiveWhitespaces="true" %>

adamrice32
- 163
- 1
- 2
- 8