Re: [Webwork-user] Mozilla
Brought to you by:
baldree,
rickardoberg
From: Rickard <ri...@te...> - 2000-11-29 07:31:37
|
Hi! "Maurice C . Parker" wrote: > public void service(HttpServletRequest request, HttpServletResponse response) > throws ServletException > { > + > + response.setContentType("text/html"); > + > if (debug) > { > Enumeration enum = request.getAttributeNames(); > > I think that this will be OK as long as only HTML the desired output from the Dispatcher. Yeah, I can see the problem and why the above fixes it... hm.. but it is not good in the long run, since it should be possible to create XML, WML, PDF, whatever.. the text/html is a good default, but it should be overridable. I was thinking something like: Foo.action -> text/html as type Foo.wml.action -> text/wml as type Foo.plain.action -> text/plain as type etc. Does this seem reasonable? It is a bit more computation to do on each call though (check extensions), but at least it is "future compliant" so WebWork can support multiple output MIME-types. /Rickard -- Rickard Öberg Email: ri...@te... http://www.telkel.com http://www.jboss.org http://www.dreambean.com |