SHARE
TWEET

Untitled

a guest Jun 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. request.setAttribute("array", array);
  2. request.getRequestDispatcher("/servleturl").include(request, response);
  3.      
  4. Object[] array = (Object[]) request.getAttribute("array");
  5.      
  6. StringBuilder queryString = new StringBuilder();
  7. for (Object item : array) {
  8.     queryString.append("array=").append(URLEncoder.encode(item, "UTF-8")).append("&");
  9. }
  10. response.sendRedirect("/servleturl?" + queryString);
  11.      
  12. String[] array = request.getParameterValues("array");
  13.      
  14. String arrayID = UUID.randomUUID().toString();
  15. request.getSession().setAttribute(arrayID, array);
  16. response.sendRedirect("/servleturl?arrayID=" + arrayID);
  17.      
  18. String arrayID = request.getParameter("arrayID");
  19. Object[] array = (Object[]) request.getSession().getAttribute(arrayID);
  20. request.getSession().removeAttribute(arrayID);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top