码迷,mamicode.com
首页 > 编程语言 > 详细

javaservlet

时间:2017-11-04 00:18:26      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:print   ext   text   center   void   throws   enter   port   pac   

packet servlet; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class CheckParamServlet extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String name = request.getParameter("name"); String pass = request.getParameter("pass"); response.setContentType("text/html;charset=gb2312"); PrintWriter out = response.getWriter(); out.println(""); out.println("

你的用户名为:"+name+"

"); out.println("

你的口令为:"+pass+"

"); out.println(""); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request,response); } }

javaservlet

标签:print   ext   text   center   void   throws   enter   port   pac   

原文地址:http://www.cnblogs.com/jgrs/p/7780547.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!