String object=request.getParameter("sellList");
    
SellChance sell=new SellChance();在Action中要把object转换为sell这个类的实例应该怎么转。在线等!谢谢

解决方案 »

  1.   

    SellChance不就是一些属性么new SellChance后,set这些属性呗
      

  2.   

    String object=request.getParameter("sellList");
    你这个sellList jsp里 应该已经是SellChance 对象了吧?
    若是的话, 你直接这样强转试试
    SellChance object=(SellChance)request.getParameter("sellList");
      

  3.   

    在这个action中SellChance是为空,已经解决了
      

  4.   

    String object=request.getParameter("sellList");
        
         SellChance sellChance=null;
        
         System.out.println(object);
        
         try {
         sellChance=(SellChance)Class.forName(object).newInstance();
    } catch (Exception e) {
    e.printStackTrace();
    }
    运行时报错:
    com.web.crmSys.entity.SellChance@964955
    java.lang.ClassNotFoundException: com.web.crmSys.entity.SellChance@964955