tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [OT] In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed
Date Fri, 24 Sep 2010 13:44:13 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

On 9/24/2010 2:22 AM, Brian wrote:
> Well, IT WORKED!

Excellent.

> Now the previous thing that went wrong is able to show its details in the
> log. What is that? A Struts tag that tries to output the content of a bean
> that is not present even though it should (this is the Struts tag:
> <bean:write name="TEXT-NoteNoShippingFees"/>).

How is the bean declared in the page? Or, is it declared in one page and
used in another?

> That bean should always be present, because it is created in the previous
> Struts action.

Where is it stored? Remember that there are 4 scopes (in increasing
order of specificity): application, session, request, and page. If your
page is looking in request scope, but the bean is in the session, it
won't be found. Or, alternatively, if you store a bean in the request
and issue a redirect, then the bean has likely been discarded.

> How can it be missing SOMETIMES, if it is not the only bean
> that is being created in the previous action, and others of these beans that
> are created in the action are present in the page? I guess it has something
> to do with the buffer that gets full sometimes, or am I wrong? What do you
> think?

You'll have to give us more details. Note that this is not a Struts
forum, though many of us (including myself) have Struts experience and
would be glad to help. Technically, you ought to start a new thread
since you're asking about a new subject (this helps people find answers
to their questions when searching the archives).

> In fact, I have had LOTs of problems with beans that "dissappear" even
> though they should be present because they were created in the previous
> actions. I have been dealing with these "randomic" problem for YEARS, and I
> applied just a patch for that ("If the bean is not present, redirect to the
> home page instead of showing an error message and dumping a trace in the
> log").  That was just a workaround, and not a clean solution. I will try now
> to use a buffer with 16K, to see if that will solve this.

Could you also be experiencing session timeouts that aren't properly
handled? Does your application use any kind of authentication and
authorization? If not, you could easily be seeing visitors with expired
sessions accessing actions that expect the session to be in a certain state.

There are lots of ways to fix this kind of thing, but the remedies all
depend upon your requirements and application architecture.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkycqy0ACgkQ9CaO5/Lv0PDGMgCgktZRGzJLSmg6KLu1fMhu0G+J
66oAniuA/KNxzzRpYyJEqOgadZZ79tF2
=EjKC
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message