Html 如何减少url长度?
我在Html 如何减少url长度?,html,jsp,Html,Jsp,我在href中传递变量,有些变量包含很多值。手机的特点 jsp代码: <% out.println("<a href='itemdetails.jsp?features="+p.getFeatures() +"&price="+p.getPrice()+"&pname="+p.getPname()+"&img="+p.getImg()+"'><div style='display: inline-block; background: url
href
中传递变量,有些变量包含很多值。手机的特点
jsp代码:
<%
out.println("<a href='itemdetails.jsp?features="+p.getFeatures() +"&price="+p.getPrice()+"&pname="+p.getPname()+"&img="+p.getImg()+"'><div style='display: inline-block; background: url("+p.getImg()+"); height: 200px; width: 200px;'></div></a>");
%>
所以url变得很长,是否有其他方法可以传递这些变量。通过使用会话
?尝试以下方法:
请参阅此链接,了解如何在jsp中使用POST。
更多信息,请参见此链接: