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.