Receiver.JSP代码:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
"pragma" content="no-cache">
"cache-control" content="no-cache">
"expires" content="0">
"keywords" content="keyword1,keyword2,keyword3">
"description" content="This is my page">
This is my JSP page.
<%=mystudent.getUsername() %>
<%=mystudent.getPassword() %>
Send.JSP代码:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
"http://www.w3.org/1999/xhtml">
"Content-Type" content="text/html; charset=utf-8" />
姓名:
"text" name="username1" id="textfield" />
密码:
"text" name="password1" id="textfield2" />
"submit" name="button" id="button" value="提交" />
Student.JAVA代码:
package com.xjx.www;
public class Student {
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
private String username;
private String password;
}