package com.itbuluoge;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class news
*/
@WebServlet("/newsdd")
public class news extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* Default constructor.
*/
public news() {
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
PrintWriter pw=response.getWriter();
//取得url参数
pw.print("username="+request.getParameter("username"));
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
servlet获取用户参数
原创wx64015c4b4bc07 博主文章分类:JAVA/JSP ©著作权
文章标签 java url参数 文章分类 JavaScript 前端开发
©著作权归作者所有:来自51CTO博客作者wx64015c4b4bc07的原创作品,请联系作者获取转载授权,否则将追究法律责任
下一篇:ns2 有线UDP模拟
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
获取用户参数函数
获取用户参数
日期格式