Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    1

    Unanswered: How to retrieve array parameter

    Code:
    public ModelAndView handleRequest(HttpServletRequest req,
    			HttpServletResponse res) throws Exception{
    Code:
    String p[] = req.getParameter("pArray");
    I can't compile, I also try casting by (String[]) but result is same
    how can I retrieve array parameter ?

  2. #2
    Join Date
    May 2007
    Posts
    80
    getParameter doesn't return an array, it returns a single String

    lookup the methods
    getParameter
    getParameterNames
    getParameterValues

    : Interface ServletRequest

    i think you want the last one.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •