<td><input type="button" value="查看学生信息"
onclick="return dosubmit()" /></td>
function dosubmit(){
var form = document.getElementById("form");
form.action="StudentResult";
return true;
}
package com.share.test;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@WebServlet("/StudentResult")
public class StudentResult extends HttpServlet{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
HttpSession session = request.getSession();
Student student=new Student();
String str="";
session.setAttribute("sresult", str);
request.getRequestDispatcher("/Studet.jsp").forward(request, response);
}
}
拖鞋_
相关分类