wood burning stoves
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
JavaRanch » Java Forums » Java » JSP
Bookmark "shrink my jsp page response" Watch "shrink my jsp page response" New topic

shrink my jsp page response

Abhi Kedare

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

Joined: Jan 10, 2002
Posts: 63868

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

[Asking smart questions] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: shrink my jsp page response
It's not a secret anymore!