就是一个很简单的程序 JSP输入用户名,在servlet接受后显示出来,但是每次显示的都是null
JSP页面:
<%@ page language=" java" import=" java.util.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head>
<base href="<%=basePath%>">
</head>
<body>
<form name="form" method="post" action="/aa">
<% request.setCharacterEncoding("UTF-8"); %>
账号:<input type="text" name="AdmName" ><br>
密码:<input type="password" name="AdmPassword" ><br><br>
<input type="button" name="sure" value="确定" οnclick="window.location.href='/servlettset/aa'">
JSP页面:
<%@ page language=" java" import=" java.util.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head>
<base href="<%=basePath%>">
</head>
<body>
<form name="form" method="post" action="/aa">
<% request.setCharacterEncoding("UTF-8"); %>
账号:<input type="text" name="AdmName" ><br>
密码:<input type="password" name="AdmPassword" ><br><br>
<input type="button" name="sure" value="确定" οnclick="window.location.href='/servlettset/aa'">