tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Help with session tags
Date Fri, 04 Mar 2005 17:22:17 GMT
Quoting Kris Schneider <kris@dotech.com>:

> I understand that this is the kind of thing you're trying to avoid, but just
> to
> be sure the problem isn't related to the taglib, what happens if you replace
> the two tags with:
> 
> <%
> if (session.isNew()) {
> %>
> This session is new.
> <%
> } else {
>     session.invalidate();
> %>
> Session ivalidated.
> <%
> }
> %>
> 
> Is it possible that some other component of your app, like a filter, is
> invalidating the session before the tag tries to?

Or maybe the old scriplet that does the same thing but is only commented-out
with <!-- --> instead of <%-- -- %>?

> Quoting Aaron Hackney <aaron@aaronhackney.com>:
> 
> > Hello. I am trying to use the session Tag library. I have some confusion
> > as it it's workings....
> > 
> > <sess:isNew>
> >   This session is new.
> > </sess:isNew>
> > <sess:isNew value="false">
> >   This session is not new.
> > </sess:isNew>
> > 
> > 
> > Works fine. First time I call the page it says "This session is new." If I
> > reload the page it says "This session is not new."
> > 
> > When I try this:
> > <sess:isNew>
> >   This session is new.
> > </sess:isNew>
> > <sess:isNew value="false">
> >   <sess:invalidate/>
> > </sess:isNew>
> > 
> > First time I call the page, all is well. The second time I call the page I
> > get a run time exception: Session is already invalidated.
> > 
> > Can anyone help me see what is wrong with my logic here? I am assuming
> > that if the session is not new then it is an existing session that I would
> > like to have invalidated. (This is a login page of my application and I'm
> > trying to remove my scriptlets....)
> > 
> > Thanks in advance.
> > -Aaron
> 
> -- 
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <mailto:kris@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


Mime
View raw message