hello2

String username = request.getParameter("username");//获取参数值
if (username != null && username.length() > 0) {
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher("/response");
//获取url为/response的servlet作为转发的对象

if (dispatcher != null) {
dispatcher.include(request, response);
//请求转发到response这个url对应的servlet
}
}
out.println("</body></html>");
}
}

posted on 2019-03-25 00:47  小奶酪  阅读(68)  评论(0编辑  收藏  举报

导航