I call the following method when logging out

  public void
destroySession(javax.faces.event.ActionEvent
actionEvent){
    HttpServletRequest request = (HttpServletRequest)
FacesContext.getCurrentInstance().getExternalContext().getRequest();

    HttpSession session = request.getSession(false);

    session.invalidate();

  }
It's placed in the backing bean that manages the
tree..
but the problem remains the same!
Nothing changes if I use 
HttpSession session = request.getSession(true);

Any idea of the reason ?


--- Marius Kreis <[EMAIL PROTECTED]> wrote:

> just call the method invalidate() of the session.
> 
> HttpSession session = (HttpSession) 
>
FacesContext.getCurrentInstance().getExternalContext().getSession(true);
> session.invalidate()
> 
> rosalba bochicchio wrote:
> > Thanks a lot for your suggestion...do you know any
> way
> > to destroy all session data ?
> > 
> > --- Marius Kreis <[EMAIL PROTECTED]> wrote:
> > 
> > 
> >>I don't think that the browser cache is the
> problem
> >>- if the browser 
> >>would cache the html of the tree then you would
> also
> >>get the old 
> >>(administrator's) tree displayed.
> >>Imho the problem is a session bean containing your
> >>tree data. You should 
> >>destroy all session data when a user logs out.
> >>
> >>rosalba bochicchio wrote:
> >>
> >>>I've probably found the trouble.
> >>>I suppose it is a problem due to browser
> >>>caching...I'll try to explain it: my web app is a
> >>>management console.
> >>>It's made up of a menu, which is a tree, a fix
> >>
> >>header
> >>
> >>>and a content page. Whe I click on the nodes of
> >>
> >>the
> >>
> >>>tree I want the content page to change. I can log
> >>
> >>in
> >>
> >>>as "simple user" or Administrator. When I log in
> >>
> >>as
> >>
> >>>Administrator I can see, as a menu, a tree made
> up
> >>
> >>of
> >>
> >>>all the users of the console. Instead, when I log
> >>
> >>in
> >>
> >>>as a "simple user" I can see anly myself. The
> >>>behaviour is the following one: When I log in as
> >>>"simple user" and the as Administrator,
> everything
> >>>works fine. When I log in as Administrator and
> >>
> >>then as
> >>
> >>>"simple user", I get the problem I tried to
> >>
> >>describe
> >>
> >>>in the previous message...that is, when clicking
> >>
> >>on
> >>
> >>>the unique node of the tree I get the exception!
> I
> >>>suppose the reason is that the browser caches the
> >>
> >>tree
> >>
> >>>with the nodes related to all the user, and gets
> >>
> >>the
> >>
> >>>exception when the node is made up of a single
> >>>node...Do you think it's a possible reason? have
> >>
> >>you
> >>
> >>>any suggestion to solve the question?
> >>>
> >>>Thanks,
> >>>Rosalba
> >>>
> >>>
> >>>--- "CONNER, BRENDAN (SBCSI)" <[EMAIL PROTECTED]>
> >>
> >>wrote:
> >>
> >>>
> >>>>Can you try with the latest release (1.1.1RC3)?
> >>>>
> >>>>- Brendan
> >>>>
> >>>>-----Original Message-----
> >>>>From: rosalba bochicchio
> >>>>[mailto:[EMAIL PROTECTED] 
> >>>>Sent: Friday, October 21, 2005 5:02 AM
> >>>>To: [email protected]
> >>>>Subject: PROBLEMS WITH TREE2
> >>>>
> >>>>
> >>>>I'm using myfaces 1.0.9. I have a problem with
> >>>>tree2...when I click on one of the nodes, I want
> >>
> >>to
> >>
> >>>>view a new page. But the click on the node
> >>
> >>generates
> >>
> >>>>the following error:
> >>>>
> >>>>java.lang.IllegalArgumentException: Node with id
> >>>>0:1.
> >>>>Failed to parse 0:1
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.TreeModel.getNodeById(Ljava.lang.String;
> > 
> >>>
> >
>
)Lorg.apache.myfaces.custom.tree2.TreeNode;(TreeModel.java:153)
> > 
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.TreeModel.setNodeId(Ljava.lang.String;)V
> > 
> >>>>(TreeModel.java:71)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.UITreeData.setNodeId(Ljava.lang.String;)
> > 
> >>>>V(UITreeData.java:290)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.HtmlTree.setNodeId(Ljava.lang.String;)V(
> > 
> >>>>HtmlTree.java:80)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.HtmlTreeRenderer.decode(Ljavax.faces.con
> > 
> >>>
> >
>
text.FacesContext;Ljavax.faces.component.UIComponent;)V(HtmlTreeRenderer
> > 
> >>>>.java:104)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
javax.faces.component.UIComponentBase.decode(Ljavax.faces.context.FacesC
> > 
> >>>>ontext;)V(UIComponentBase.java:305)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.UITreeData.processDecodes(Ljavax.faces.c
> > 
> >>>>ontext.FacesContext;)V(UITreeData.java:139)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
org.apache.myfaces.custom.tree2.HtmlTree.processDecodes(Ljavax.faces.con
> > 
> >>>>text.FacesContext;)V(HtmlTree.java:91)
> >>>>  at
> >>>>
> >>>
> >>>
> >
>
javax.faces.component.UIComponentBase.processDecodes(Ljavax.faces.contex
> 
=== message truncated ===



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

Reply via email to