JSP - FAQ (1)
Java Server Pages Frequently Asked Questions
Maintainer: Richard Vowles, email@example.com (http://www.esperanto.org.nz
What is JSP?
What version is the current version of JSP?
Where can I get the specification for JSP?
Who supports JSP?
What books are available for JSP?
Is JSP better than ASP (Microsoft's Active Server Pages)?
What HTML editors support JSP?
Yes, but how does it perform?
How to invoke a JSP page directly from by browser?
How do you invoke a JSP page from a servlet?
How do you pass data (including beans) to a JSP from a servlet?
How can I pool connections to my database?
How do I use other languages in my JSP?
How can I set a cookie in JSP?
Can JSP and Servlet share same Session and Beans?
How do I plug JSP into Microsoft's IIS Web Server?
Are there any newsgroups that discuss JSP?
What do the differing levels of bean storage (page, session, app) mean?
Where can I find the mailing list archives?
What are the important steps in using JDBC in JSP?
How does variable scope work in JSP?
How do I forward to an HTML page?
Are there any white papers or documents explaining how JSP fits?
How to I create dynamic GIFs for my JSP?
Do you know where I could get some code that would encode something to the HTML DTD standard?
What is page compilation?
How are servlets and JSP pages related?
Any good web sites for up to date activities in the
How do I force a user to log in?
So how can a newbie get started with JSP?
How can I ensure that session objects stay in existence when the web server restarts?
How can I include one JSP inside another JSP?
Is there some sort of event that happens when a session
object gets bound or unbound to the session?
Is there a way to execute a JSP from the comandline or from my own application?
What should I use, Model 1 or Model 2?
How do I delete a cookie with JSP?
Are there tips on things to watch out for in JSP?
How do you get started with JSP on the Macintosh?
What Application Servers support JSP?
What happened to the LOOP and DISPLAY tags from JSP 0.92?
Does JSP have a bean providing File Upload features like ActiveX upload control?
So how do I use EJB from JSP?
Can I just abort processing a JSP?
"I'm trying to pass an object between a servlet and a JSP page, but my object is null on the JSP page. What could be wrong?"
1) What is JSP? TOC
JSP is a dynamic scripting capability for web pages that allows Java as well as a few special tags to be embedded into a web file (HTML/XML, etc). The suffix traditionally ends with .jsp to indicate to the web server that the file is a JSP file. JSP is a server side technology - you can't
do any client side validation with it.
JSP files actually get compiled into Servlets, so what is the point? Why not just write Servlets?
For most people, the benefit is twofold:
The focus is on HTML. Java and the JSP extensions assist in
making the HTML more
functional. Servlets on the other hand allow outputting of HTML but it is a tedious
It is easy to make a change and then let the JSP capability of the Web Server you are
using deal with compiling it into a Servlet and running it.
In the past, people have used servlets because of the
problem of redirection - because by the time the JSP engine gets around to writing information back down the HTTP pipe, you could not do a redirect effectively in JSP - leading to
the concepts of Model 1 vs Model 2 (see question 38). This has been fixed in JSP 1.0 with the addition of buffered output streams.
JavaSoft also has a FAQ, covering different questions, and it is located at http://java.sun.com/products/jsp/faq.html.
2) What version is the current version of JSP? TOC
The current version of JSP is 1.1. It is available from http://java.sun.com/products/jsp.
The JSP 1.1 is available from