struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Nenning <Christoph.Nenn...@lex-com.net>
Subject Re: S2: How to tell if a response has been committed from an interceptor?
Date Thu, 07 Jan 2016 09:38:42 GMT
> Inside an Interceptor I'm getting an exception
> 
> java.lang.IllegalStateException: Cannot create a session after the 
response
> has been committed
> I have access to the ActionInvocation as this is passed into 
doIntercept()
> public String doIntercept(ActionInvocation invocation) throws Exception
> 
> My question is: from the ActionInvocation how do I find out if the 
response
> has been committed?
> 
> Can I get the HttpServletResponse? So I can call response.isCommitted() 
?
> 
> How?
> 


If you really need access to Response you can get it via a static method 
in ServletActionContext.



Regards,
Christoph

This Email was scanned by Sophos Anti Virus

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