一个简单的JavaWeb程序,但是在浏览器中不能运行,提示Invalid location of tag (form),但是我找不到原因是什么????
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>request获取表单数据示例</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<font size="2">
下面是表单内容:
<form action="Form.jsp" method="post">
用户名:<input type="text" name="userName" size="10"/>
密码:<input type="password" name="password" size="10"/>
<input type="submit" value="提交">
</form>
下面是表单提交以后用request取到的表单数据:<br>
<%
out.println("表单输入userName的值:"+request.getParameter("userName")+"<br>");
out.println("表单输入password的值:"+request.getParameter("password")+"<br>");
%>
</font>
</body>
</html>
呦呦米