Argh... just so no one thinks I forgot about this... I've had to work from home all this week for various unforeseen reasons, and of course as a pessimist like myself would expect, the mostly working code got lost since this weekend. Thought there was a copy on my thumb drive, but of course not, copy on PC was since squashed, etc. Typical Murphy's Law.

I believe there is an older version sitting on my work PC, so as soon as I get back there (which doesn't look to be tomorrow either), I can get it and figure out what I had fixed subsequent to that. Argh I say, ARGH! That just reminds me to set up SVN on my new home server this weekend!

And Jason, I get what you wrote here about the Result, I was planning on refactoring to that before this little setback :) I don't think it would have been a problem per se to render the response in an Interceptor, that seemed like it was going to work, but it did present the problem of mixing and matching XML/JSON as we were discussing, so for that reason alone it would seem to make sense. Thanks for the info on that!

Frank

Jason Carreira wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Java Web Parts -
http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to