There are various ways of writing server code that build on top of the basic Servlet classes. JSP (Java Server Pages) and Freemarker let you embed bits of Java code, and other scripting inside your HTML pages. These are parsed and converted to Java Servlet programs that dynamically generate HTML with variable fields. These are automatically recompiled as needed.
With JSP all you have to do is drop the *.jsp files in a magic directory and away you go. With Servlets you must put the *.class files or *.war files in a magic directory, and register the servlets in a web.xml file that maps application name to servlet class among other things.
// imports used in Servlets import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.ServletException;
Sun does not provide the jars. You get them from your servlet womb vendor — his particular implementation of the interfaces. If you use Caucho Resin, it will automatically use its version of the classes and automatically recompile your java source as-needed. You have to read the womb docs. Often they make you copy the entire set of system jars to your own directory for use.
javax.servlet.Filter is an interface to allow a transaction to be processed in an assembly line. Each Filter does some of the work and passes on the input or output to the next filter in the chain, and decides on who is next.
this.getServletContext().log( "oops: database connection lost" );System.out. println and System. err. println may or may not work in any given womb.
![]() |
recommend book⇒Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam | |||
| by | Bryan Basham, Kathy Sierra, Bert Bates | 978-0-596-51668-0 | paperback | |
|---|---|---|---|---|
| publisher | O’Reilly |
978-1-4493-6086-3 | eBook | |
| published | 2008-08-07 | B009Z45JAI | kindle | |
| A very complete book, partly because it aims to prepare you for the Sun exam. It is also a difficult book. | ||||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
![]() |
recommend book⇒Core Servlets and Javaserver Pages: Advanced Technologies, Vol. 2, second edition | |||
| by | Marty Hall, Larry Brown, Yaakov Chaikin | 978-0-13-148260-9 | paperback | |
|---|---|---|---|---|
| publisher | Prentice Hall | 978-0-13-271568-3 | eBook | |
| published | 2007-12-01 | B004YWAZFA | kindle | |
| Complete text of the book available on line in pdf format. | ||||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
![]() |
recommend book⇒Java Servlet Programming, second edition | |||
| by | Jason Hunter, William Crawford | 978-0-596-00040-0 | paperback | |
|---|---|---|---|---|
| publisher | O’Reilly |
978-1-4493-9067-9 | eBook | |
| published | 2001-03-01 | B0043M4Z8E | kindle | |
| highly recommended. Covers basics of JSP too. | ||||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
![]() |
recommend book⇒Web Development with JavaServer Pages | |||
| by | Duane K. Fields, Mark A. Kolb, Shawn Bayern | 978-1-930110-12-0 | paperback | |
|---|---|---|---|---|
| publisher | Manning | |||
| published | 2001-09-15 | |||
| A very thorough treatment. | ||||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
![]() |
recommend book⇒Inside Servlets: Server-Side Programming for the Java(TM) Platform, second edition | |||
| by | Dustin R. Callaway, Danny Coward | 978-0-201-70906-3 | paperback | |
|---|---|---|---|---|
| publisher | Addison-Wesley | |||
| published | 2001-05-14 | |||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
![]() |
recommend book⇒Developing Enterprise Java Applications with EE and UML | |||
| by | Khawar Zaman Ahmed, Cary E. Umrysh | 978-0-201-73829-2 | paperback | |
|---|---|---|---|---|
| publisher | Addison-Wesley | |||
| published | 2001-10-27 | |||
| Greyed out stores probably do not have the item in stock. Try looking for it with a bookfinder. | ||||
|
|
available on the web at: |
http://mindprod.com/jgloss/servlet.html |
optional Replicator mirror
|
J:\mindprod\jgloss\servlet.html | |
![]() |
Please email your
feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear
wording, broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[54.224.79.93] |
|
| Feedback | You are visitor number 29,287. | |