tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Cronin <tcro...@AUSTIN.CollegeClub.com>
Subject RE: Gzip
Date Thu, 28 Dec 2000 20:37:43 GMT
<%@ page import="<package>.GZIPOutputStream" %>

<%@ page import="java.io.OutputStream" %>

<%
      OutputStream out1 = response.getOutputStream();
      out = new PrintWriter(new GZIPOutputStream(out1), false);

      /*you should use the response.setContentType() */
      response.setHeader("Content-Encoding", "gzip");
       
%>
 
-----Original Message-----
From: Matt B [mailto:MBeckius@sourcetechcorp.com]
Sent: Thursday, December 28, 2000 12:34 PM
To: tomcat-user@jakarta.apache.org
Subject: Gzip


I want to use GZip compression on JSP page.  I've done this with a servlet
using the following code:
 
      OutputStream out1 = response.getOutputStream();
      out = new PrintWriter(new GZIPOutputStream(out1), false);
      response.setHeader("Content-Encoding", "gzip");
      ......
 
How would I get the equivalent using JSP?
 
 
TIA
 
Matt B.

Mime
View raw message