Mail Archive Home | exo-portlet-container List | March 2008 Index
| <-- Date Index --> | <-- Thread Index --> |
Dear,
I am writing because I am testing the RC4 of eXo Platform Portlet
Container 2.0. Just now I am focusing on testing the AJAX support. It
works fine, thanks for this good tool, but I have a doubt. The portlet
specification says that portlet fragment served by "serveResource"
method could be HTML, XML, JSON and so on. If my "serveResource" method
returns HTML all work fine but I am having some problems when it returns
XML. That is, the following code works fine.
// It is a short version of the code with some content omitted
public void serveResource(request, response) {
response.setContentType("text/html");
?
}
But the following code does not work.
// It is a short version of the code with some content omitted
public void serveResource(request, response) {
response.setContentType("text/xml");
?
}
In the portlet.xml file, I had both mime types declared.
?
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supports>
<mime-type>text/xml</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
?
I have also tried with other mime types for xml (e.g. application/xml,
text/xml-external-parsed-entity, etc.) but none of them work.
If I try to print the supported mime types using code. That is,
printing the result of request.getResponseContentTypes(), it only
prints "text/html".
But, if I change the portlet.xml as follows
?
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
<supports>
<mime-type>image/jepg</mime-type>
<portlet-mode>view</portlet-mode>
</supports>
?
It prints both mime types "text/html, image/jepg".
So, I think the container accepts only certain mime types. I am not
sure if I am doing something wrong or this is the correct behaviour of
the container, if that?s the case, is there an XML mime type accepted
by the container?
I look forward to hearing from you. Thanks in advance.
Best Regards,
Sandy Perez
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.