Is there a way how the output of a JSP page could be compressed by removing all CR, TABs, SPACEs from the HTML?

Bozidar Dangubic

well, they are ignored by the browser so there should be no problem (unless you surround spaces with < pre> and </ pre> in which case there is a problem. I am curious as to why you need this. to answer your question directly, you can do this if you are utilizing XSL to generate your JSP pages. XSL can supress unwanted spaces from the output with a simple directive. however, if you are not using XSL, your JSP page generates HTML content for the client. so you are in complete control over content that is being displayed on the client which means that you are the one who is generating unwanted characters in the first place. so go through your code and make sure that you do not if you do not need them. but as I said, browser ignore them anyways as you can see here (I put 10 spaces between closing parenthesis and a period) .

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact