code: public void doPost(HttpServletRequest request,
                          HttpServletResponse response) 
          throws ServletException, IOException
      {
          String target=null;
          response.sendRedirect(request.getContextPath()+
                                request.getServletPath()+"/"+
                                Long.toString(System.currentTimeMillis(),36)+
                                (target!=null?("#"+target):""));
      }
docs: /* ------------------------------------------------------------