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 Leon Doud <do...@yahoo.com> on 2003/06/20 20:35:57 UTC

Setting locale after a buffer flush

While using the formatDate tag an error occurs if the
buffer is already flushed.

Is there a better way to avoid this problem with large
JSPs then setting the buffer to a very large amount? 
Is there a way to get the tag not to set the locale?


Example of the error:
<%@ taglib prefix="fmt"
uri="http://java.sun.com/jstl/fmt"%>
<jsp:useBean class="java.util.Date" id="now"/>
<% out.flush(); %>
<fmt:formatDate value="${now}"/>

Error:
java.lang.IllegalStateException: Response is already
committed!
	at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.EvermindHttpServletResponse.setLocale(EvermindHttpServletResponse.java:1754)
	at
org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.setResponseLocale(SetLocaleSupport.java:234)
	at
org.apache.taglibs.standard.tag.common.fmt.SetLocaleSupport.getFormattingLocale(SetLocaleSupport.java:314)
	at
org.apache.taglibs.standard.tag.common.fmt.FormatDateSupport.doEndTag(FormatDateSupport.java:148)

Thanks,
Leon





__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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