[opencms-dev] Serving WML and XHTML with WALL tag library

Michael Kraus michael.kraus at mindmatics.de
Thu Jul 13 17:06:33 CEST 2006


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



More information about the opencms-dev mailing list