I have a called a Servlet and I am sending an ArrayList with request attribute from Servlet to JSP. I am calling a js function from the same JSP in which I am passing the ArrayList as a param to the js function. I want to retrieve the values from this ArrayList.
Code as follow:
<c:if test="${currentPage lt noOfPages}">
<a onclick="OnNextButtonClick(${currentPage},'${al}');">
<Next>
</a>
</c:if>
//Here al is the ArrayList
<script type="text/javascript">
function OnNextButtonClick(currentPage,al)
{
alert("current page == " + currentPage );
alert("current page == " + al);
var arr = new Array();
var arr = al.split(',');
alert(arr);
}
This arr is giving me values as follows:
[com.package@1def,com.package@fkbe23,com.package@546fhfg]
I want the values stored at this location.
Can someone help me?
arris object. extract it by using.and the members of that object you want to retrieve.