首页 > 其他 > 详细

Struct初学的,页面跳转

时间:2014-12-11 22:07:43      阅读:370      评论:0      收藏:0      [点我收藏+]

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);

Struct初学的,页面跳转

原文:http://www.cnblogs.com/codemouserman/p/4158587.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!