mholzner wrote : | the content type interceptor determines the content type that the browser requested / can handle |
I guess I'm just not seeing how the ContentTypeInterceptor actually does what you said. | ... | try | { | // Set UTF-8 for parameter decoding | HttpServletRequest req = invocation.getRequest().getContext().getClientRequest(); | req.setCharacterEncoding("UTF-8"); | } | catch (UnsupportedEncodingException e) | { | throw new InvocationRuntimeException("Cannot set request encoding", e); | } | | // Configure the stream info | HTTPStreamInfo info = new HTTPStreamInfo(MediaType.HTML, "UTF-8"); | ServerResponse resp = invocation.getResponse(); | resp.setStreamInfo(info); | | // Continue invocation | invocation.invokeNext(); | ... | It seems to just set the allowed MediaType to HTML. So even if I make a request from the client with a content type of text/xml and I have a portlet which supports that content type and i try to set the content type of the response to text/xml in the portlet there is the check of the requested media type against the response media type (set by the ContentTypeInterceptor to always be HTML) at line 76 of org.jboss.portal.portlet.impl.RenderResponseImpl. text/xml is not a supported subtype of HTML (rightly so) and so the check fails and throws the IllegalArgumentException. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3915334#3915334 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3915334 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user