<jsp:useBean id="type" class="java.lang.String" scope="session"/>

解决方案 »

  1.   

    我是意思是说在另一个JAVA文件里怎么取到这个值?
      

  2.   

    你的javaBean肯定有个实例的吧,你可以通过构造器或setType(String)传进去。
      

  3.   

    我是在Action的ActionForward execute接收页面传来的值,并放在SESSION里.
    想在其它JAVA文件使用这个type
      

  4.   

    在页面String type = (String)session.getAttribute("type");
    然后将type当参数传到bean里面就可以了
      

  5.   

    <%=session.getAttribute("type")%>