struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Barr <sc...@exergonic.com.au>
Subject Re: java.lang.IllegalStateException: Cannot forward after response hasbeen committed
Date Fri, 28 Mar 2003 01:31:38 GMT

What you're doing sounds like a really good candidate for either

a) Filters and Container Managed Security
The CMS can manage your course level security (eg. are you logged on),
and the Filter can manage the finer levels (can the user execute this
action?)

or

b) the security filter project (haven't used this myself)

It really is well worth the initial effort.

Scott
www.exerogic.com.au


On Fri, 2003-03-28 at 11:54, Becky Norum wrote:

> Thanks for all the reponses.
> 
> It's actually a piece of code within a custom tag, so the scope probably
> isn't an issue.
> 
> The tag checks to see if the user is a member of the group s/he is
> trying to access.  So, probably, some HTML response is output before the
> tag is called. (because a header file is included via jsp:include), but
> the tag is called at the top of the JSP page. 
> 
> So I hear y'all saying to call the tag before writing HTML, but that
> would require some significant rearranging.  Plus, sometimes it works
> just fine - actually, when I call the page directly it works, but when I
> do a forward it doesn't.  
> 
> So do I need to call the page directly rather than forward?
> 
> Thanks so much,
> 
> Becky
> 
> 
> 
> On Thu, 2003-03-27 at 19:55, Alexandre Jaquet wrote:
> > what's your scope definition ? (in the struts-conf)
> > 
> > --
> > Alexandre Jaquet
> > 
> > ----- Original Message -----
> > From: "Becky Norum" <bnorum@coe.neu.edu>
> > To: <struts-user@jakarta.apache.org>
> > Sent: Friday, March 28, 2003 1:47 AM
> > Subject: java.lang.IllegalStateException: Cannot forward after response
> > hasbeen committed
> > 
> > 
> > >
> > > Does anyone know what the following exception means?
> > >
> > > javax.servlet.jsp.JspException: java.lang.IllegalStateException: Cannot
> > > forward after response has been committed
> > >
> > > It seemed to be related to something in this area of code:
> > >
> > > //             ModuleConfig config = (ModuleConfig)
> > > pageContext.getRequest()
> > > //                 .getAttribute(org.apache.struts.Globals.MODULE_KEY);
> > > //     try {
> > > // pageContext.forward(config.getPrefix() + page);
> > > //     } catch (Exception e) {
> > > //
> > >
> > > Thanks!
> > >
> > > Becky
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message