|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
casting of 2D array
Hi,
I have try to forward from a servlet to a JSP. Code in my servlet is below: String[ ][ ] carrot; : : RequestDispatcher rd = getServletContext().getRequestDispatcher("/summary.jsp"); request.setAttribute("Data", arr); rd.forward(request, response); Code in my summary.jsp is below: <% String[ ][ ] listSort = (String[ ][ ])request.getParameter("sortedData"); : : %> But i keep getting the below error message: Invalid cast from java.lang.String to java.lang.String[ ][ ]. May I know which is the correct way to retrieve an 2D array?? Thanks a lot.. |
|
#2
|
|||
|
|||
|
Try using request.getAttribute() instead of request.getParameter().
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > casting of 2D array |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|