Re: Unable to change content-type with Interceptor?

2012-12-30 Thread Burton Rhodes
Lukasz - Thanks for all your help. You got me on the right track and it appears the json Result was what was overriding and setting the content type. As a result, I have overridden the JSONResult class to use the "dynamic" content-Type. /** * Custom json result type to set Content-Type respons

Re: Unable to change content-type with Interceptor?

2012-12-30 Thread Lukasz Lenart
2012/12/30 Burton Rhodes : > HttpServletResponse response = (HttpServletResponse) > invocation.getInvocationContext().get(StrutsStatics.HTTP_RESPONSE); Maybe try to use: HttpServletRequest request = ServletActionContext.getRequest(); Regards -- Ɓukasz + 48 606 323 122 http://www.lenart.

Re: Unable to change content-type with Interceptor?

2012-12-30 Thread Lukasz Lenart
2012/12/30 Burton Rhodes : > Just tried that without success. Oddly, even when I debug the code, the > reponse.contentType is not changed immediately after the line: > response.setContentType("text/plain"). I am wondering if the contentType > cannot be set twice (or overridden once set)? As ment

Re: Unable to change content-type with Interceptor?

2012-12-30 Thread Burton Rhodes
Just tried that without success. Oddly, even when I debug the code, the reponse.contentType is not changed immediately after the line: response.setContentType("text/plain"). I am wondering if the contentType cannot be set twice (or overridden once set)? On Sun, Dec 30, 2012 at 11:39 AM, Lukasz

Re: Unable to change content-type with Interceptor?

2012-12-30 Thread Lukasz Lenart
2012/12/30 Burton Rhodes : > I'm not sure what I'm doing wrong, but I cannot for the life of me change > the content-type of the response using an interceptor. My interceptor code > is below. The example below seems a bit absurd, but eventually I will add > code to change the content-type dynamic

Unable to change content-type with Interceptor?

2012-12-30 Thread Burton Rhodes
I'm not sure what I'm doing wrong, but I cannot for the life of me change the content-type of the response using an interceptor. My interceptor code is below. The example below seems a bit absurd, but eventually I will add code to change the content-type dynamically from "application/json" to "te