问题遇到的现象和发生背景
jsp request.getparameter()为null
问题相关代码,请勿粘贴截图
%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<form action="test02.jsp" method="post">
<input type="text" name="usename">
<input type="text" name="xuehao">
<input type="submit" value="提交">
</form>
</body>
</html>
<%@ page contentType="text/html;UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%
String str1=request.getParameter("usename");
String str2=request.getParameter("xuehao");
%>
<font color="aqua" size=10 face="楷体">
姓名为:<%=str1%>
学号为:<%=str2%>
</font>
</body>
</html>
运行结果及报错内容
取不到表单中的值