[QUOTE][QUOTE]/*
*包名
*/
package Admin_Beans.Struts.ActionBeans;
//************************************************
import JavaBeans.UserInfo.UserBeans;
import JavaBeans.Constents_File.Constants;
import Admin_Beans.Struts.ActionFormBeans.Admin_Form;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
//**************************************************
//**************************************************
public final class Adminlist_Action extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception{
HttpSession session=request.getSession();
session.setAttribute(Constants.USER_LIST,"d"); //就是这里抱错,该包入早包了,该创建对象早创建了,以前没问题,用了Jcreator就出了N做问题
//以下略。,,,,,
[QUOTE]因为session是JSP的内建对象,可以直接使用,但在bean中并没有此对象,如果你想用可以使用servlet,在servlet中有servlet容器给你的request对象(方法request.getSession())返给你一个session对象,如:HttpSession session = request.getSession();就可以使用这个session了!你明白了吗?[/QUOTE]
这点偶还是知道的,不过还是谢谢热心个朋友!