This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I hope this can be done, else I'n gonna hve to rethink things here...
I have a reporting tool which does quite a complicated search (SQL), so rather than have all the workings of the search in a messy JSP, I've dumped it all into a Servlet, which the uses PrintWriter to output the results.
What I really want is for the results to be outputted(is that a word?) to an existing JSP template page.
So it would be great if there was some sort of JSP <% input Servlet results here function %> rather than using a PrintWriter to output the entire page.
That' a common thing to do. Processing is performed in a Servlet, the data is attached to the request as a scoped variable (or variables) using the setAttribute() method, and a request dispatcher is used to forward to a JSP page where the data is used to render the view.