Skip to main content

Servlet program to read get request or URL data



Servlet program to read get request or URL data


Here i am not writing all the code from scratch instead i just provide you the doGet method only. 



    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
       String uname;
       response.setContentType("text/html");
       PrintWriter out= response.getWriter();
       uname= request.getParameter("Uname");              
       out.println("<B>Uname:" +uname +"</B>");  
      
    }

Comments