I created the MyClass class, which intends to display a large amount of text in the JSP. Instead of the MyClass object returning a string that will be displayed on the page, I thought it would be better to use the MyClass object to use the output stream of the page. Is this a good / affordable idea?
When testing possible ways to do this ...
They display text, but it appears in front of the page body:
response.getWriter().append("test1");
response.getWriter().println("test2");
response.getWriter().write("test3");
These errors tell me that the output stream has already received:
response.getOutputStream().println("test4");
source
share