struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Carreira <forum-struts-...@opensymphony.com>
Subject Re: DWR/Struts integration: why? (Re: JavaOne Ajax Discussion)
Date Mon, 29 May 2006 08:01:49 GMT
> 
> Ted and Jason, I did see your messages about
> AroundInterceptor and 
> Result correspondingly... right now, in the interest
> of simply getting 
> it working, I'm just doing a simple AroundInterceptor
> using before() and 
> after(), one interceptor for XML and one for JSON
> (although as I just 
> wrote that it dawned on me that that probably won't
> work because mixing 
> XML and JSON probably won't work... might have to
> combine them and allow 
> configuration... I'll see...)
> 
> I read up on Restults a bit yesterday, and I can
> certainly see why you'd 
> say that Jason... this still feels to me like
> something that should 
> really be just an interceptor though... but, the code
> is at this point 
> generic enough that moving it or putting it in a
> different form 
> shouldn't be a big deal, so that can be decided
> later... lemme just get 
> it all working first :)
> 
> Frank
> 


The problem you're having composing the JSON and XML is because the output should be a result.
Interceptors don't produce content, that's orthogonal to their usage. Results are all about
generating output. What would happen if I configured an Action with the JSON interceptor to
read the incoming request and produce output, but also configured the action to have a JSP
page as the Result? They can't BOTH write to the output stream.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=32216&messageID=63313#63313


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message