That's exactly what I'm trying now. I'm glad you concurred with me. Thanks for all your help! Have a great weekend.
-----Original Message----- From: Dave [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 4:10 PM To: [email protected] Subject: Re: inserting java code in templates On Nov 30, 2007 4:49 PM, Prabhu Patil <[EMAIL PROTECTED]> wrote: > I already tried the pageContext and getResponse() method of it. It did > not work. Roller just painted the current page, but did not redirect to > another page that I was hoping to see. Below are code snippets. > > this.pageContext = (PageContext)params.get("pageContext"); > this.resp = (HttpServletResponse)pageContext.getResponse(); > .... > > resp.sendRedirect(redirectURL); > Another approach of writing to response also gave the same result. Below > is the code snippet: > > pageContext.getOut().println("<script > type=\"text/javascript\">document.location.href='" > + redirectURL + > "';</script>"); A client-side redirect should work, but there's no need to use pageContext.getOut(). Just put the Javascript right into the page template. - Dave
