I have the following problem.
Into the service() method of a custom servlet that implement the HttpServlet interface I put an array of custom object into the session, in this way:
// The collection that have to be shown in a table inside the JSP view:
SalDettaglio[] salDettaglio = this.getSalDettaglioList();
HttpSession session = req.getSession(false);
session.setAttribute("salDettaglio", salDettaglio);
Then I want to retrieve this array salDettaglio into my JSP page. So I am trying to do something like this:
<%@ page import="com.myproject.xmlns.EDILM.SalReport.SalDettaglio" %>
<!-- showSalwf.jsp -->
<html>
<head>
</head>
<body>
<%
out.println("TEST SALWF");
SalDettaglio[] salDettaglio = request.getParameter("salDettaglio");
%>
</body>
</html>
The problem is that an error occur on this line:
SalDettaglio[] salDettaglio = request.getParameter("salDettaglio");
The IDE say to me that:
Incompatible types. Required: com.myproject.xmlns.EDILM.SalReport.SalDettaglio[] Found: java.lang.String
Why? How can I solve this issue?