I am passing an ArrayList during form submission.

mydata.jsp?action=submit&arr=<%=arrlist%>
where arrlist is of type ArrayList.

How can I get the values of it in the server side? I used
String str = (ArrayList) request.getParameter("arr");

But showing some type cast error.