ServletActionContext.getRequest().getParameter("pp");ServletActionContext 是import org.apache.struts2.ServletActionContext;但是Eclipse下提示ServletActionContext.getRequest()下没有getParameter("pp")这个方法,但是同学有,我是不是缺了哪个包没有导入?

解决方案 »

  1.   

    ServletActionContext可以点出getRequest()这个方法不。如果不能,则相应的包没有导入
      

  2.   

    servlet-api.jar,在tomcat/lib下存在
      

  3.   

    ServletActionContext可以点出getRequest()
    缺少这个包应该在哪里找到,我的tomcat没有
      

  4.   


    D:\JBuilder2007\thirdparty\Apache-Tomcat-5.5\common\lib
      

  5.   

    ServletActionContext是在struts2-core.x.x.x.jar中。
      

  6.   

    Struts问题:struts的标签中,能把值从前台带到后台,和bean进行自动绑定,是怎么实现的?
    <s:bean name="com.hsquan.xmis.manager.SearchManager" id="serManager">  
    <s:param name="id">id</s:param>
    </s:bean>   后台java类中设一个id接收的。
    这样总不成功。
    有谁有办法解决吗? 怎么把一个值从前台带到后台?
      

  7.   

    ActionContext.getRequest().getParameter(""); 
      这样试试行吗?
      

  8.   

    ActionContext.getRequest()这个是struts2.0里面的类,他要借助tomcat的lib才能使用?