I want generate a CSV-File within a JSP file.
It works fine and it gets his parameters from URL, so there is just one problem: it just wont break the line to fill a new row.
Here is my code:
<jsp:scriptlet>
response.setHeader("Content-Disposition", "attachment;
filename=exam.csv");
String line = request.getParameter("line");
String data = request.getParameter("data");
String example = line + "\r\n" + data;
pageContext.setAttribute("example", example);
</jsp:scriptlet>
<c:out value="${example}" escapeXml="false" />
As long as it was hardcoded, everything was fine. Now it just want to break the line. Thanks for any answers.