Difference between revisions of "Obtaining servlet GET parameters"

From MyWiki
Jump to: navigation, search
(Created page with "<source lang="java"> public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<source lang="java">
 
<source lang="java">
  public void doPost(HttpServletRequest request, HttpServletResponse response)
+
  public void doGet(HttpServletRequest request, HttpServletResponse response)
 
                                       throws ServletException, IOException
 
                                       throws ServletException, IOException
  
HttpSession sess = request.getSession(); Oops this is for getting values from the session !
+
HttpSession sess = request.getSession(); //// Oops this is for getting values from the session !
  
 
// and then
 
// and then

Latest revision as of 19:27, 3 November 2014

 public void doGet(HttpServletRequest request, HttpServletResponse response)
                                       throws ServletException, IOException
 
HttpSession sess = request.getSession(); //// Oops this is for getting values from the session !
 
// and then
 
 String  name = request.getParameter("username" );