-
1. Re: Negotiating the content type
spiritualmechanic May 13, 2004 10:51 AM (in response to holtmanna)Can you not override the content type in the servlet API? Or are you having JSPs generate WML? I think there's a JSP tag you can use to set the content type.
It's probably just defaulting, but you *should* be able to override it. I haven't tested it. -
2. Re: Negotiating the content type
holtmanna May 13, 2004 11:04 AM (in response to holtmanna)Hi thanx for the answer. I have a second, similar application, where I don't have to negatiate content types. The JSP pages have a top index.jsp and that calls a method:
String contextPath = request.getContextPath();
request.getRequestDispatcher("/[start].do").forward(request, response);
(Struts StartAction.java, leading to WML start.jsp, which is a preface page to index.jsp)
That works 100% with my other application, but not here with the second one. So Ethereal network analyzer tells me "content-type text/html" before that start.jsp comes alive, and nowhere in my application I set it to html, so that's strange. Could it be a default value?
I would be very glad if anyone can give me a hint on that issue ;-))
Thanks alot,
Andreas -
3. Re: Negotiating the content type
holtmanna May 14, 2004 8:14 AM (in response to holtmanna)Hi,
thanx and I have found out myself: I have to set the content type with a line like this in the preface:
<%@ page contentType="text/vnd.wap.wml" %>
Otherwise, it points to the defaults, which is html.
So I can sleep better now ;-)))
Andreas