Jeff, I'm going to examine session on the server side using a method of the Model object and going to return a string to the template.
Then a java script will consume this string on the client side and redirect to another URL if necessary. Thanks -----Original Message----- From: Jeffrey Blattman [mailto:[EMAIL PROTECTED] Sent: Friday, November 30, 2007 4:21 PM To: [email protected] Subject: Re: inserting java code in templates how will you inspect the values of a session attribute on the client side? i assume by "session" prabhu meant http session. On Nov 30, 2007, at 2:09 PM, Dave wrote: > 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
