AW: [opencms-dev] serving wml

Tilman Rossmy tilman at tilman-rossmy.de
Fri Nov 25 12:43:26 CET 2005


Hi Achim!
Yes this approach seems to work for now:
<%

  CmsFlexController controller = CmsFlexController.getController(request);
  response = controller.getTopResponse();
  response.setContentType("text/vnd.wap.wml");
  response.addHeader("Content-Disposition", "filename=test.wml");

%>

Seems a bit complicated but if it works it works, at least for Series40
Browsers.
Thanks a lot.
Greetings from cold and snowy Munich 
Tilman

-----Ursprüngliche Nachricht-----
Von: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Achim Westermann
Gesendet: Freitag, 25. November 2005 10:36
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] serving wml

Hi Tilman,

you could try the following eample to start. It is taken out of
CmsRfsFileDownloadServlet that works for the workplace tool logfile viewer
(It forces the client to pop up a download dialog even if the content
requested is of know type).


public void doPost(HttpServletRequest req, HttpServletResponse res) throws
IOException, ServletException {

  CmsFlexController controller = CmsFlexController.getController(req);
  res = controller.getTopResponse();
  res.setContentType("application/octet-stream");
...

happy coding,

-- 
Achim Westermann
-------------------
Alkacon Software
http://www.alkacon.com



Tilman Rossmy wrote:
> Hi all!
> I have a jsp that uses the wall taglib to render dynamic content for 
> different mobile devices, wml capable devices will
> get wml. Now I have a problem setting the content-type in the jsp. It 
> seems that response.setContenttype("text/vnd.wap.wml")
> has no effect in is overwritten by the OpenCmsServlet. I'm sure this is 
> a question asked plenty of times before, but there is nothing
> much I found in the archive. Thanks for any help.
> Tilman
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev




_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list