You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Nic Werner <ni...@sonoma.edu> on 2004/09/14 19:21:45 UTC

Redirect Issues

Greetings again,
    I've noticed a problem with redirect if I have a good chunk of code, 
where it won't redirect and I get this log error:

----- Root Cause -----
java.lang.IllegalStateException
        at 
org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:338)
        at 
org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:151)
        at 
org.apache.jsp.editoutlethandler_jsp._jspService(editoutlethandler_jsp.java:602)
        at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

.....googling this I see its a problem with too much whitespace? I was 
able to correct this once by jamming all my tags together, making it 
fairly unreadable, but this time around I'm trying to find a  better 
pattern to this. Do certain tags cause this problem?

- Nic.

----------------------------
Nic Werner
Sonoma State University

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Redirect Issues

Posted by Serge Knystautas <se...@lokitech.com>.
Nic Werner wrote:
> Greetings again,
>    I've noticed a problem with redirect if I have a good chunk of code, 
> where it won't redirect and I get this log error:
> 
> ----- Root Cause -----
> java.lang.IllegalStateException
>        at 
> org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:338) 
> 
>        at 
> org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:151) 
> 
>        at 
> org.apache.jsp.editoutlethandler_jsp._jspService(editoutlethandler_jsp.java:602) 
> 
>        at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

First suggestion is to increase your page buffer size so that more of 
your response can be kept in memory.  Second would be to try to move the 
redirect higher in the JSP.  Third, in case this isn't the whole stack 
trace, make sure you're not trying to do a redirect in an include file.

-- 
Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Redirect Issues

Posted by Kris Schneider <kr...@dotech.com>.
The "better pattern" is don't use a JSP to issue a redirect (or a forward for
that matter). This is much better suited to a Filter or a Servlet or a
controller component of an MVC framework (like Struts).

Quoting Nic Werner <ni...@sonoma.edu>:

> Greetings again,
>     I've noticed a problem with redirect if I have a good chunk of code, 
> where it won't redirect and I get this log error:
> 
> ----- Root Cause -----
> java.lang.IllegalStateException
>         at 
>
org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFacade.java:338)
>         at 
>
org.apache.taglibs.standard.tag.common.core.RedirectSupport.doEndTag(RedirectSupport.java:151)
>         at 
>
org.apache.jsp.editoutlethandler_jsp._jspService(editoutlethandler_jsp.java:602)
>         at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> 
> .....googling this I see its a problem with too much whitespace? I was 
> able to correct this once by jamming all my tags together, making it 
> fairly unreadable, but this time around I'm trying to find a  better 
> pattern to this. Do certain tags cause this problem?
> 
> - Nic.
> 
> ----------------------------
> Nic Werner
> Sonoma State University

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org