for stuts 1, to get session, via the following
 
      session=request.getSession();
      session.setAttribute("PERSON", person);    /* person is object name */
 
for struts 2, to get session, via the following
 
      Map session=ActionContext.getContext().getSession();
      session.put("PERSON", person);    /* person is object name */
 
question is
   
    for struts2: if i use the following
          session.setAttribute("PERSON", person);    
    then compile to get following error
            
               cannot find symbol
                       symbol  : method 
setAttribute(java.lang.String,neuco.Person)
                        location: interface java.util.Map
                        session.setAttribute
 
   is that means for struts2, when i use session, i have to use session.put, 
but session.setAttribute is no longer valid?
   what is the difference b/w session.put and session.setAttribute?
 
thanks in advance
 
john

Reply via email to