Cameron, It depends on what action you want the JSP to perform. Normally, you still need the usual <HTML><BODY></BODY></HTML> tags if you want to present information to the user in a browser but, theoretically, a JSP could perform an 'invisible' task. The JSP compiler translates your JSP into a servlet which, at runtime, outputs all the plain HTML in your JSP as-is and executes the java code in the <% %> tags. What arrives at the browser should be valid and plain HTML (or something the browser can recognise e.g. XML, plain text )
Originally posted by Cameron Park: Hi, I am a bit confused. Does JSP have to be in HTML format?
No. A JSP can be in any format, although in practice you are restricted to text-based formats. Don't forget to set a proper response MIME type for what you're generating. Obviously, whatever format you generate has to be something the client expects (a browser would typically expect plain text or HTML, a WAP phone expects WML, an XSL engine would expect a specific XML vocabulary). But that is really outside the scope of the JSP proper. The JSP engine doesn't care what format you generate. - Peter
Joined: Apr 06, 2001
Thank you Peter!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com