Hitting a JSP from a Servlet
posted 15 years ago
I have a strange problem to solve. My servlet reads the source code for the JSP from the database, and writes it to a file, which the user can later hit. Before writing the JSP to a file, the servlet has to 'hit' the JSP, to make sure that the JSP gets compiled with no errors. sendRedirect and forward do not work in this scenario, because the control has to return to the servlet after 'hitting' the JSP. Can any one suggest me a soluation? I am basically looking for some sort of 'curl(a unix command)' that I can use in my servlet. Any suggestions?
Author and all-around good cowpoke