struts2 jsp 传值到action出现乱码

 

       <s:url action="flight_yuding" id="yuding">
           <s:param name="destination"><s:property value="destination" escape="false"/></s:param>
           <s:param name="flight_number"><s:property value="flight_number" escape="false"/></s:param>
           <s:param name="flight_time"><s:property value="flight_time"/></s:param>
           <s:param name="zhekou"><s:property value="zhekou"/></s:param>
           <s:param name="money"><s:property value="money"/></s:param>
           <s:param name="flight_date"><s:property value="flight_date"/></s:param>
       </s:url>
       <s:a href="%{yuding}">预订</s:a>

 

escape属性表示所传的值是否要escape HTML

标签<s:property>中的escape属性默认值是true,当我们像上面形式一样传递有中文值是一定要显示设置为false

你可能感兴趣的:(html,jsp)