I am trying to create a portlet that just returns content of type image/png. So 
I have configured my portlet with:

                <supports>
  |                     <mime-type>image/png</mime-type>
  |                     <portlet-mode>VIEW</portlet-mode>
  |             </supports>

and in my portlet I set the type as:

                response.setContentType("image/png");

But when I run the portlet I get the following exception:                 
java.lang.IllegalArgumentException: Content type not accepted

According to the spec this exception is thrown when the content type does not 
match request.getResponseContentType().

When I add a debug statement, I see that request.getResponseContentType() 
returns text/html.

Shouldn't this return image/png since I configured it as above? Or is this a 
bug or am I trying to do something that I shouldn't?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972015#3972015

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972015
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to