各种传值方式

四种传值方式:form表单  隐藏域   URL   javabean

jsp页面像java后台传值方法:

  传一个值:方法名?参数名=值

  传多个值:方法名?参数名=值 & 参数名 = 值&.......    

  wind.location.href =/路径/方法名?参数 = 值 &.....

  后面也可是路径名.....  

  比如: wind.location.href =/路径/方法名?参数 = 值 & url="../../方法名?参数名=值;"

A页面像C页面传值

Struts: 固定传值 和 &(页面获取)

    java后台:getRequest().getParameter("type");

         getRequest().serAttribute("type",type);

    <result name="test" type="redirect">doIndex.do?status=1&amp;type=${type}</result>

  

原文地址:https://www.cnblogs.com/jiaobaobao/p/5872461.html