struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Bizarre sporadic problem with streaming a stylesheet.
Date Tue, 21 Sep 2010 16:02:58 GMT

to ask the unasked question..If Streaming is associated with media types such as audio or
video
How does one "stream" a stylesheet?

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.



 

> Date: Tue, 21 Sep 2010 11:29:02 -0400
> From: dale@newfield.org
> To: user@struts.apache.org
> CC: dbs@homeport.org
> Subject: Re: Bizarre sporadic problem with streaming a stylesheet.
> 
> On 9/21/10 12:36 AM, Dave Belfer-Shevett wrote:
> > <LINK REL="StyleSheet" href="getConfiguredStylesheet.action"
> > type="text/css">
> 
> It shouldn't matter, but the browser might be deciding something wonky 
> based on the fact that that url doesn't end .css...you could either add 
> css as an action extension or maybe use urlrewrite to make a .css url 
> actually result in your .action request.
> 
> > public void getConfiguredStylesheet() throws IOException, Exception {
> 
> Shouldn't all action methods return String? What's the action mapping 
> associated with this?
> 
> > resp.getWriter().write(sb.toString());
> > resp.getWriter().flush();
> > resp.getWriter().close();
> 
> The appropriate return value for actions that generate their own output 
> is null. This is rarely the best solution, though, as there's more to 
> the http protocol than the content of the response. You're returning no 
> header information.
> 
> > curl http://localhost:8080/congo/public/getConfiguredStylesheet.action
> 
> try curl -i to see the header info. Compare that output to a curl -i 
> request for a .css file delivered by your web app through more 
> conventional methods.
> 
> > resp.setContentType("text/css");
> 
> I believe that since you're generating the response yourself this has no 
> effect.
> 
> If you want to return a stream, there is a stream result type that'll 
> help you out:
> http://struts.apache.org/2.2.1/docs/stream-result.html
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message