code: public void doGet (HttpServletRequest request,
              	   HttpServletResponse response)
      throws ServletException, IOException
      {
      	String access = request.getParameter("access");
      	String callAuthCode = getServletContext().getInitParameter("call.code");
      	if (callAuthCode.equals(access)) {
  
  			String toAddr = "sip:+" + request.getParameter("to").trim() + "@"
  					+ getServletContext().getInitParameter("domain.name");
  
  			String fromAddr = "sip:"
  					+ getServletContext().getInitParameter("user1") + "@"
  					+ getServletContext().getInitParameter("domain.name");
  
  			String secondParty = "sip:+" + request.getParameter("from").trim()
  					+ "@" + getServletContext().getInitParameter("domain.name");
  
  			URI to = toAddr == null ? null : sipFactory.createAddress(toAddr)
  					.getURI();
  			URI from = fromAddr == null ? null : sipFactory.createAddress(
  					fromAddr).getURI();
  
  			// Create app session and request
  			SipApplicationSession appSession =
  			// ((ConvergedHttpSession)request.getSession()).getApplicationSession();
  			sipFactory.createApplicationSession();
  
  			SipServletRequest req = sipFactory.createRequest(appSession,
  					"INVITE", from, to);
  
  			// Set some attribute
  			req.getSession().setAttribute("SecondPartyAddress",
  					sipFactory.createAddress(secondParty));
  			req.getSession().setAttribute("FromAddr",
  					sipFactory.createAddress(fromAddr));
  			req.getSession().setAttribute("user",
  					getServletContext().getInitParameter("user1"));
  			req.getSession().setAttribute("pass",
  					getServletContext().getInitParameter("pass1"));
  
  			logger.info("Sending request" + req);
  			// Send the INVITE request
  			req.send();
  
  		}
          // Write the output html
      	PrintWriter	out;
          response.setContentType("text/html");
          out = response.getWriter();
          
          // Just redirect to the index
          out.println("<HTML><META HTTP-EQUIV=\"Refresh\"CONTENT=\"0; URL=index.jsp\"><HEAD><TITLE></HTML>");
          out.close();
      }
docs: Handle the HTTP GET method by building a simple web page.