白衣染霜花
struts2 freemarker request session parameter使用Request里的Attribute值最简单的方法就是直接${AttributeName}或者安全一点:${AttributeName!"default Value"}3.取request范围的对象${Request.myRequestAttribute} 或者 : ${Request.myRequestAttribute!"default value"}4.取request parameter范围的对象${Parameters.myParameter} 或者 : ${Parameters.myParameter!"default value"}5.取context parameter范围的对象${stack.findValue('#myContextParam')}request 对象直接对应 HttpServletResponse例如 获取 当前网页地址: ${request.requestURL}客户端IP地址: ${request.getRemoteAddr()} 或者 ${request.remoteAddr}提交方式: ${request.method}等等Request: 用于获取Request对象中的attribute对象。例如:${Request["myRequestAttribute"]} 这样是直接在页面输出属性值。相当于request.getAtrribute("myRequestAttribute");如果要对这个值进行判断就必须使用如下格式:<#if Request["myRequestAttribute"]="edit">或者 : ${Request["myRequestAttribute"]!"default value"}