Review:Java Servlet Programming 41
Java Servlet Programming | |
author | Jason Hunter & William Crawford |
pages | |
publisher | O'Reilly & Associates |
rating | 8 |
reviewer | CowboyNeal |
ISBN | 1-56592-391-X |
summary | O'Reilly is known for it's in-depth, tell-all approach to computer related topics. This book doesn't disappoint and features many different ways to use Java Servlets, many of which may not occur to the average CGI scripter. |
What's Good?
I used Java Servlets almost immediately after their release, and always liked the idea of platform-indepent scripts that could give one the same functionality as CGI scripts. It didn't take long for me to discover that servlets aren't limited to returning only web pages, but this book explores several options that one may not think of right off.
The examples given are of use in practical real-world situations, whether it's connecting to a database to generate pages, editing images on the fly, or writing applets that connect to servlets. After reading the examples, you can easily see where you could utilize the concepts in server-parsed web pages.
Having written countless web scripts in Perl, I was pleased to see all of the major concepts of web scripting covered within the context of servlets. Java Servlet Programming includes a JDBC primer, as well as sections on session tracking and security issues.
What's Bad?
Not much. Seriously, O'Reilly books make up a large part of my personal library because they don't disappoint. The entire Java series is full of great books, and this one continues the trend. If you don't know much Java, this book isn't going to hold your hand through it, as it assumes that you're fairly secure in your knowledge of Java, and that you're comfortable using objects in Java.
Who should buy this book?
If you like Java and think that everything should be written in it, including your web scripts, then this is the book for you. I would consider this the best reference for servlet programming to date, and it beats the hell out of the standard documentation. If you're thinking about brewing up a Java servlet, this is the reference you want.
If you want to buy this book, head over to Amazon.
Table of Contents
Preface
- Introduction
- HTTP Servlet Basics
- The Servlet Life Cycle
- Retrieving Information
- Sending HTML Information
- Sendind Multimedia Content
- Session Tracking
- Security
- Database Connectivity
- Applet-Servlet Communication
- Interservet Communication
- Internationalization
- Odds and Ends
Appendix A: Servlet API Quick Reference
Appendix B: HTTP Servlet API Quick Reference
Appendix C: HTTP Status Codes
Appendix D: Character Entities
Appendix E: Charsets
Index
EJB's ? (Score:1)
Can anyone poiint to good on-web references ?
Is This Book Really Needed? (Score:1)
Has anyone else noticed... (Score:1)
that the Java logo looks like a cup of coffee with a large turd floating in the center of it?
Bull Tinkle -- look in chapter 2, pp. 37-47 (Score:1)
Oh, and did I mention Cocoon [apache.org]? Stefano's "XSP" idea (XML Server Pages) is probably the direction where JSP is headed anyhow.
Depends on what you're doing (Score:1)
If you're a wizard then duh, it won't help you. In that case head on over to the cocoon website [apache.org] and think about contributing to the project. Show everyone what a stud you are and work with some really neat material at the same time.
The mighty mod_jserv (Score:1)
Also, I don't have to depend on an evil monolithic corporation for my server software this way.
Help with setting up Apache-Jserv (link) (Score:1)
running, take a look at Ari Halberstadt's great
guide to Using Apache-Jserv [magiccookie.com]. It can save you time and frustration.
You could also hire him. (heheheh)
Finally, for Apache 1.3.4 and 1.3.6, save yourself some trouble by symlinking {APACHE_INSTALL}/bin to {APACHE_INSTALL}/sbin.
java web tools vs. ??? (Score:1)
I don't miss Perl's regexp engine at all, because I simply don't need to use it under Zope.
Book Cover (Score:1)
WHat's JSP? (Score:1)
Zipwow
Java in a Nutshell Book Cover (Score:1)
It's got a Javan Tiger on it (believed to be extinct, last seen in 1972)
Mark
Setting it up (Score:1)
From personal experience, I tried for a long time (about 3 weeks with many rebuilds) to set up the Apache Jserv on Solaris with Apache 1.3.4 and could never get it to work. I was able to get Apache and JRun (from www.livesoftware.com) to work, but some things were flaky with the class loader.
I'm not doing my testing with Sun's Web Server. Don't get me wrong, Apache rules. I would rather use Apache, but if you want to use Servlets with ease and get going without much headache, the Java Web Server is really quite good. It is a nice alternative if you can't get Jserv or JRun working right.
Excellent Book (Score:1)
EJB's ? (Score:1)
Setting it up (Score:1)
The Java Web Server costs $300, and Apache is free. Consider the cost of JWS as a support cost in case you need it... which is rather cheap as support goes.
Book Cover (Score:1)
In addition all the Linux Book have cowboys, and I'm not sure what their travel books have
Ditto... (Score:1)
This book is great. (Score:1)
no JSP (Score:1)
According to the book, JSP came along just before the book went to press. There are about five pages on JSP, but it serves only to convey the general idea, especially since Sun has since introduced a radically different version of the spec.
JSP looks really cool; once a 1.0 spec comes along, I'll be excited to use it.
Setting it up (Score:1)
-Bill
GenericServlet ??? (Score:1)
java web tools vs. ??? (Score:1)
In case it matters, the intended project is a dynamic website with a database backend.
Book Cover (Score:1)
AWT has a can of paint, Distributed Computing has Tinkertoys, Security has a bird's nest with eggs in it. You can browse through them at . Kinda cool. [oreilly.com]
Setting it up (Score:1)
a solaris box running Suns Java WebServer
a solaris or linux box runing apache and JRun
a solaris or linux box runing apache and Jserv
anything else?
Setting it up (Score:1)
Servlet Programming (Score:1)
Depends on what you're doing (Score:2)
If you're a wizard then duh, it won't help you. In that case head on over to the cocoon website [apache.org] and think about contributing to the project. Show everyone what a stud you are and work with some really neat material at the same time.
Great book (Score:2)
Oh , and I bought it for 9.95$ including shipping at www.fatbrain.com and using the FATBRAIN code (plus got a cool cap).
[ but if you want to contribute to Ron, get it from amazon with the link provided above ]
no JSP (Score:2)
The Java Apache Project (Score:2)
If you interested in trying out servlets try
http://java.apache.org/
www.coolservlets.com (Score:2)
If you're interested in Servlets, check out this new site.
www.coolservlets.com [coolservlets.com]
It is all about open-source servlets and they have a few packages available already!
CHET OUT
perl vs. java vs. python (Score:3)
Then there's Perl. It's ugly and it WORKS. That's all there is to it. Do what you will, just don't let a newbie Perl hacker anywhere near a production mod_perl system or you will regret it.
Perl is tightly integrated with the Apache API via mod_perl, so you can do damn near anything in Perl that you can in C. Like AOLServer and Tcl or Roxen and Pike, Perl and Apache are an item. For building up libraries of reusable functions and objects you create Perl modules, simple as that.
Java servlets are like Scheme programs if you do them right. You get a bunch of beautifully polished classes (because it just takes too damn long to write crappy code in Java) that are ideal for reuse, if you prototyped and designed well. Sessions are great, and the servlet API makes them trivial to use. Servlets are much, much better (IMHO) for production systems that have been slapped together as prototypes in something like Perl or Python. (an interesting extension to this idea is using JPython to write servlets... haven't heard of any recent successes but you could try) And the Apache-Jserv project is a great community thing -- very dynamic, lots of great new ideas. But Java is a (manually) compiled, strongly typed language and a servlet usually takes more time to write than the equivalent one-shot Perl script.
My boss likes writing servlets because he can't deal with Perl, but doesn't mind Java at all. I like prototyping in Perl because it's fast, but god damn it feels good to come up with an elegant class and stick it in our local project's