[opencms-dev] Serving WML and XHTML with WALL tag library
Christian Steinert
christian_steinert at web.de
Fri Jul 14 11:27:32 CEST 2006
Michael Kraus schrieb:
> Dear all,
>
> We have problems with the MIME type of the HTTP response by OpenCms.
> We'd like to use OpenCms to serve WML/XHTML pages using the WALL tag
> library. Our pages all look like this:
>
> <%@ taglib uri="/WEB-INF/wall.tld" prefix="wall"
> %><wall:document><wall:xmlpidtd/>
> <wall:load_capabilities/>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <wall:head>
> ...
> </wall:head>
> <wall:body>
> ...
> <wall:block>
> </wall:document>
>
> When requesting a page (with a WML user agent), the response's MIME type
> is as follows:
>
> test/ application/xml+html
> test/test1.html text/html
> test/test2.wml application/xml+html
> test/test3.xyz text/html
>
> As you see, the MIME type depends on the file extension, not on what is
> set by wall:document. We also tried to set the MIME type manually by
> inserting the following code either before or after wall:document:
>
> CmsFlexController controller =
> CmsFlexController.getController(request);
> response = controller.getTopResponse();
> response.setContentType("text/vnd.wap.wml");
> response.addHeader("Content-Disposition", "filename=index.wml");
>
> Unfortunately, this has absolutely no effect.
>
> Any help would be highly appreciated.
>
> Regards,
> Michael
>
I think you sadly have to edit the file mimetypes.properties which is
inside opencms.jar and associate your file extension with the mime type
you like.
Probably it would also be good if you could file a bug report in the
opencms bugzilla, because you said that response.setContentType does not
work and at least IMHO it's an error if it doesn't.
Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060714/12f8ae4b/attachment.bin>
More information about the opencms-dev
mailing list