@Override protected void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {
  QueryCommand cmd=QueryCommand.UNKNOWN;
  String param=request.getParameter("param");
  String value=request.getParameter("value");
  PrintWriter out=response.getWriter();
  String cmdStr=request.getParameter("cmd");
  if (cmdStr != null) {
    cmd=QueryCommand.valueOf(cmdStr);
  }
  HttpSession session;
switch (cmd) {
case SET:
    session=request.getSession();
  session.setAttribute(param,value);
break;
case GET:
session=request.getSession();
String val=(String)session.getAttribute(param);
if (val != null) {
out.write(val);
}
break;
case INVALIDATE:
session=request.getSession();
session.invalidate();
break;
case CALLBACK:
Callback c=(Callback)context.getAttribute("callback");
c.call(request,response);
break;
}
}

@ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { QueryCommand cmd = QueryCommand . UNKNOWN ; String param = request . getParameter ( "param" ) ; String value = request . getParameter ( "value" ) ; PrintWriter out = response . getWriter ( ) ; String cmdStr = request . getParameter ( "cmd" ) ; if ( cmdStr != null ) { cmd = QueryCommand . valueOf ( cmdStr ) ; } HttpSession session ; switch ( cmd ) { case SET : session = request . getSession ( ) ; session . setAttribute ( param , value ) ; break ; case GET : session = request . getSession ( ) ; String val = ( String ) session . getAttribute ( param ) ; if ( val != null ) { out . write ( val ) ; } break ; case INVALIDATE : session = request . getSession ( ) ; session . invalidate ( ) ; break ; case CALLBACK : Callback c = ( Callback ) context . getAttribute ( "callback" ) ; c . call ( request , response ) ; break ; } }
the standard servlet method overridden .
