Html 在表单中使用post方法时出错
当我在将表单传递到下一页时使用post方法时,我将得到null 重复这个问题Html 在表单中使用post方法时出错,html,jsp,struts,html-select,idempotent,Html,Jsp,Struts,Html Select,Idempotent,当我在将表单传递到下一页时使用post方法时,我将得到null 重复这个问题 标题 函数callme() { 警报(“Hi”); 警报(document.getElementById(“prio”).value); } 1. 2. 在testjsp.jsp中,我试图对prio变量进行prin操作,但我无法对其进行prin操作,它的prin值为null。我只想在其他服务器端组件中访问变量prio,还想使用post方法 <html> <head> Tit
标题
函数callme()
{
警报(“Hi”);
警报(document.getElementById(“prio”).value);
}
1.
2.
在testjsp.jsp中,我试图对prio变量进行prin操作,但我无法对其进行prin操作,它的prin值为null。我只想在其他服务器端组件中访问变量prio,还想使用post方法
<html>
<head>
Title
</head>
<body>
<%
String prio=request.getParameter("prio");
out.println("the value of prio is"+prio);
%>
</body>
</html>
标题
这和幂等性质有关吗?
我不明白为什么我不能访问testjsp页面中的变量prio。您将请求编码为
多部分/表单数据
,通常用于上传文件。servlet容器不支持自动解码此数据,仅支持application/x-www-form-urlencoded
数据(默认值)。要使用多部分/表单数据
,您需要一个第三方MIME解析器,如
<html>
<head>
Title
</head>
<body>
<%
String prio=request.getParameter("prio");
out.println("the value of prio is"+prio);
%>
</body>
</html>