tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt B" <MBeck...@sourcetechcorp.com>
Subject Re: Gzip
Date Thu, 28 Dec 2000 21:04:18 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");
         
  %>


  I had already tried that but the problem is that I get this error:

  org.apache.jasper.JasperException: Unable to compile class for JSPD:\jakarta-tomcat\work\localhost_8080%2Ffirekey\_0002fjsp_0002frxwriter_0002frx_0002fPrescriptionView_0002ejspPrescriptionView_jsp_53.java:185:
Incompatible type for =. Can't convert java.io.PrintWriter to javax.servlet.jsp.JspWriter.
                        out = new PrintWriter(new GZIPOutputStream(out1), false);
                            

  Plus your comment says that I should set the content type, but the content type is still
text/html.. It's the encoding type that I'm interested in changing. I want to send HTML encoded
with GZip.

  TIA

  Matt B.

Mime
View raw message