This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi, I want to transform a response from a servlet from XML ( the reply from the servlet display XML on my web browser ) to HTML using XSLT. How do I capture the response from a servlet to transform it? I am relatively new to servlet so forgive ignorance.
The most elegant solution is to use a filter that processes the outcome of the service method of you servlet, and transforms the XML to HTML. You could also build a simple XSLTHelper that you invoke at the end of your service method. There are numerous examples on both filters and how to do an XSL transformation from a servlet (do a Google search, or check the tutorials on java.sun.com)