You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Stefan Hepper <st...@hursley.ibm.com> on 2003/11/12 20:53:50 UTC

Re: getResponseContentTypes()..

yes, the sample portal implementation only supports HTML as this was
sufficient for passing the tests and demonstrating how pluto works.
Other content types, like WML or VoiceXML are therefore not supported by
the portal. However the pluto container supports all content types, this
is just a limitation of the sample portal driver.

Stefan


Stephan Huber wrote:
> Thanks a lot Ru.
> 
> I found out that "RenderResponseImpl.java" implements the method 
> "setContentType(...)" in pluto source code.
> 
> Here it is:
> 
> RenderResponseImpl.java:
> ------------------------
> public void setContentType(String type)
> {
>   String mimeType = stripCharacterEncoding(type);
>   if (!isValidContentType(mimeType)) {
>     throw new IllegalArgumentException(mimeType);
>   }
>   this._getHttpServletResponse().setContentType(mimeType);
>   isContentTypeSet = true;
> }
> 
> private boolean isValidContentType(String type)
> {
>   return type.equals("text/html");
> }
> 
> This means that only "text/html" is a supported MIME type.
> 
> CU
> 
> - Stephan Huber
> 
> 
> 
> Rudnev, Alex (OCTO) wrote:
> 
>> You should not (can't) use portlet to return image/gif or image/jpg, use
>> servlets deployed as part of the portlet application for this purpose 
>> (for
>> static content you don't you just place those files into your webapp 
>> and you
>> are done). For referencing them from portlet content you should use 
>> resource
>> urls formed by response.encodeURL.
>>
>> Also you probably want to look at topic "Using binary content-types?" -
>> http://nagoya.apache.org/eyebrowse/BrowseList?listName=pluto-user@jakarta.ap 
>>
>> ache.org&by=thread&from=522409&to=522409&first=1&count=11
>>
>> In more advanced implementations of portal that use 
>> pluto-portlet-container
>> api you would probably extend supported content types.
>>
>> Ru
>>
>>
>>> -----Original Message-----
>>> From: Stephan Huber [mailto:shuber@ti.com]
>>> Sent: Wednesday, November 12, 2003 10:52 AM
>>> To: Pluto-user
>>> Subject: getResponseContentTypes()...
>>>
>>> Hi,
>>>
>>> does Pluto only support "text/html" as a MIME type because
>>> "getResponseContentTypes()" just returns "text/html" as supported MIME
>>> type?
>>>
>>> I would need "image/gif" or "image/jpg" too, to send graphics within my
>>> response.
>>>
>>> Best regards,
>>>
>>> - Stephan Huber
> 
> 
> 
> 
>