Filter控制器
jsp页面代码
<form action="page_login.action" method="post">
user:<input type="text" name="user">
pass:<input type="password" name="pass">
<input type="submit" value="sure">
</form>
<a href="page_reg.action">注册</a>
解决乱码的问题:POST 请求方法
<% request.setCharacterEncoding("UTF-8"); %>
Filter
HttpServletRequest req= (HttpServletRequest) request;
String Serverpath=req.getServletPath();
if(Serverpath.equals("/page_input.action"))
{
request.getRequestDispatcher("input.jsp").forward(request, response);
}
前端
${expression language} el表达式
${requestScore.produce.name}
sever 和Filter 区别, 后者功能>前者