Thanks, but I am not sure how to do that in a dispatcher. -Borut
2009/4/23 Howard Lewis Ship <[email protected]>: > 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 <[email protected]> > wrote: >> 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() == "" ? >> StringUtils.substringAfterLast(path, "/") : path.substring(1); >> >> if (uglyWordSet.contains(uglyWord)) { >> // return some XML if url contains some ugly word >> // WHAT IS THE BEST APPROACH TO RETURN XML (STREAM) ? >> return true; >> } >> >> return false; >> } >> >> I know how to create a page which returns xml stream response (I >> actually have one). Can I just reuse this page? >> >> Using T 5.0.18. >> >> Regards, >> Borut >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > Director of Open Source Technology at Formos > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
