Re: Dispatcher returning XML

2009-04-23 Thread Howard Lewis Ship
A dispatcher is even easier; just think of it as a servlet that returns true if it "handles the request". Get a response stream and write XML to it. On Thu, Apr 23, 2009 at 3:05 PM, Borut Bolčina wrote: > Thanks, but I am not sure how to do that in a dispatcher. > > -Borut > > 2009/4/23 Howard Le

Re: Dispatcher returning XML

2009-04-23 Thread Borut Bolčina
Thanks, but I am not sure how to do that in a dispatcher. -Borut 2009/4/23 Howard Lewis Ship : > You can return a StreamResponse whose job is to generate an > InputStream of XML to be sent to the client. > > On Thu, Apr 23, 2009 at 6:12 AM, Borut Bolčina > wrote: >> Hello, >> >> I have a dispat

Re: Dispatcher returning XML

2009-04-23 Thread Howard Lewis Ship
You can return a StreamResponse whose job is to generate an InputStream of XML to be sent to the client. On Thu, Apr 23, 2009 at 6:12 AM, Borut Bolčina wrote: > Hello, > > I have a dispatcher which matches some URL pattern like this: > >    public boolean dispatch(Request request, Response respon

Dispatcher returning XML

2009-04-23 Thread Borut Bolčina
Hello, I have a dispatcher which matches some URL pattern like this: public boolean dispatch(Request request, Response response) throws IOException { String path = request.getPath(); // just imagine this works ok String uglyWord = request.getContextPath() == "" ? Stri