session.getAttribute("你存入的东西") ------------------------------------------------------
           我们还年轻牛奶会有的奶牛也会有的 
             可天天在 csdn 混这些会有吗 ??

解决方案 »

  1.   

    String getAttribute(String name)Retrieves an attribute value by name.Parameters:  name:  The name of the attribute to retrieve.Returns:
    The Attr value as a string, or the empty string if that attribute does not have a specified or default value.
      

  2.   

    但是在servlet使用session就报错啊?说什么session not found,请问要加载什么类吗?
      

  3.   

    你不要用直接用session啊,servlet里不是参数HttpServletRequest request吗,你用request.getSession()啊
      

  4.   

    HttpSession session = request.getSession(true);其中参数为true,当没有session时,创建一个新的session8实例。默认参数为true;
    看看你是否把它写为false了?