You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by sa...@grupodelaware.com on 2004/11/29 17:58:32 UTC
Two questions: print-friendly mode and changing content-type
Hi, I'm working in my first project with Jetspeed 1 and have a couple of
things I don't know how to do...
- I have a single maximized portlet with no control frame (you know, the
little title bar with the minimize, maximize, etc. buttons). How can I
change its mode to print-friendly from the Java action? I have tried with
ActionLoader.getInstance().exec(rundata, "controls.Print");
but in the parameters of rundata js_peid is null and it returns, doing
nothing. ?
- I want to export some data to a text file. I used this code
---
HttpServletResponse response = rundata.getResponse();
response.setContentType("text/plain");
response.setHeader("Cache-control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
String nombreFichero = "centros.txt";
response.setHeader("Content-Disposition", "inline; filename=\""
+ nombreFichero + "\"");
response.getOutputStream().print("CONTENT HERE!");
response.getOutputStream().flush();
---
but a exception is generated by setContentType
java.lang.IllegalStateException: Attempt to change ContentType after
calling getWriter() (cannot change charset from 'UTF8' to 'ISO-8859-1')
What am I missing?
Thanks in advance.
--
Sergio A. Delgado Quero
sadelgadoq@grupodelaware.com
******************DESCARGA DE RESPONSABILIDAD******************
Este mensaje es privado y confidencial y solamente para la persona a la que
va dirigido. Si usted ha recibido este mensaje por error, no debe revelar,
copiar, distribuir o usarlo en ningún sentido. Le rogamos lo comunique al
remitente y borre dicho mensaje y cualquier documento adjunto que pudiera
contener. No hay renuncia a la confidencialidad ni a ningún privilegio por
causa de transmisión errónea o mal funcionamiento.
Cualquier opinión expresada en este mensaje pertenece únicamente al autor
remitente, y no representa necesariamente la opinión de GRUPO DELAWARE, a
no ser que se diga expresamente y el remitente esté autorizado para
hacerlo.
******************DISCLAIMER******************
This message is private and confidential and it is intended exclusively
for the addressee. If you receive this message by mistake, you should not
disseminate, distribute or copy this e-mail. Please inform the sender and
delete the message and attachments from your system. No confidentiality
nor any privilege regarding the information is waived or lost by any
mistransmission or malfunction.
Any views or opinions contained in this message are solely those of the
author, and do not necessarily represent those of GRUPO DELAWARE, unless
otherwise specifically stated and the sender is authorised to do so.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org