*
The moose likes JSP and the fly likes shrink my jsp page response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "shrink my jsp page response" Watch "shrink my jsp page response" New topic
Author

shrink my jsp page response

Abhi Kedare
Greenhorn

Joined: Dec 10, 2010
Posts: 9
Hi all,
I want to shrink my jsp page text/html response as current page has lot more html code.
please give me solution for removing whitespace and carriage line feed for part of html code block or whole html code in jsp AT RUNTIME ( at the time of request response processing ) .
I just want decrease load time of my page


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Have you 100% determined that removing whitesapce will actually make a difference before going through all the trouble?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

See the servlet filter to compress your HTML. This reduces the amount of bandwidth used to transmit the page. Also make sure css and javascript is externalized.

Before you do this, you should make sure the time is coming from actually transmitting the page. If it takes 5 seconds to render your page and .2 seconds to transmit it, the improvement from shrinking the page won't help you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
wood burning stoves
 
subject: shrink my jsp page response
 
Similar Threads
How to redirect to a servlet when accessing an HTML page
Anyone know how to save the response (html) of a jsp page to a file
getting data from html drop down list to jsp
Designing a shopping cart
decreasing width of drop down box