Slashdot Mirror


How Tomcat Works

Petri Aerikkala writes "Don't judge a book by its cover, but by what it covers. How Tomcat Works has a very ordinary cover, but I cannot overemphasize how useful its contents are. This book does what the title says, plus much more. It is useful for not only those using Tomcat or those working with servlets/JSP/J2EE, but also for all Java developers in general." Read on for the rest of Aerikkala's review. How Tomcat Works author Budi Kurniawan and Paul Deck pages 458 publisher BrainySoftware rating 8 reviewer Petri ISBN 097521280X summary Explains how Tomcat works and how to build a servlet container of your own

First of all, this is the only book I know of that explains how the complete system works. You can find good documentation on how to use this most popular servlet container on the Tomcat project's Web site, but little is said about how it works. If you want to join this open source project, good luck. You should consider yourself lucky (or very brilliant) if you can understand how the system works in less than 3 months by browsing through its millions of lines of code.

However, why I find this book appealing is because of the approach the authors take in analyzing it: build Tomcat from scratch, line of code by line of code, module by module. Miraculously, in doing so they never fail to make sure their readers can follow the technical discussions. In their hands, Tomcat looks easy that even beginners of Java can understand. There are many complex technologies used in Tomcat, and they are all explained well.

The book starts off by building a dummy Web server that can do no more than sending a static HTML page. The web server is simple and consists of only three classes. The backbone of this application is the java.net.Socket class, and the authors take their time explaining this class at the beginning of the chapter. Basically, this is how the application in this chapter works: for each HTTP request, open a socket connection to the client, read the content of the static file, and send the file to the browser. As simple as that.

Chapter 2 builds on the application in Chapter 1. In this chapter, the web server gets some intelligence. It is now able to invoke a basic servlet by calling the servlet's service method. However, more complex servlets are beyond this simple servlet container, mainly because the container passes a null ServletRequest and a null ServletResponse objects to the service method. Before the authors start coding, they explain the javax.servlet package in general so that those new to servlet programming can understand this chapter.

Chapter 3 explains how to create ServletRequest and ServletResponse objects so that the servlet container in Chapter 2 can do more. The excitement comes in Chapter 4 when the authors explain how to pool ServletRequest and ServletResponse objects to beef up performance. This topic is not only relevant to Tomcat, but also Java programming in general. Object instantiation is expensive, and one way to avoid it is by reusing objects. However, you must be careful when your application will be used by many clients, as you must then think about thread safety. Chapter 4 elegantly explains how Tomcat developers solve this problem, as well as teach you a general solution for object pooling. Interestingly, a servlet is always represented by a single instance, and the same instance services all incoming requests.

The authors are also patient in explaining everything step by step, until the last chapters where they tackle more difficult problems such as Digester, JMX, class loaders and session management.

Not only will you be good at configuring Tomcat after you are finished reading this, you will also be able to tell straight away what's going on whenever your Tomcat installation throws up some error message. In addition, if you are really serious about Tomcat, you can start thinking of writing your own modules or extending the existing ones. For example, as the authors have demonstrated, you can extend Tomcat's application loader to automatically reload a Struts application when the struts-config.xml is modified, making the application development process quicker.

This book is also great in answering many questions that seasoned servlet/JSP programmers might have long been pondering. For example, this book discusses the difference between an OutputStream and a PrintWriter, and why you can only use one of them rather than both. It also tells you why you cannot write to the request parameters or headers.

Now, as much as I liked it, this book is not perfect. The first noticeable flaw is that there are quite a number of disturbing spelling mistakes. Also, the index could have been better, not to mention a cover that is plain and uninspiring. However, I have to admit I am very happy with this book and will recommend it to any Java programmer.

You can purchase How Tomcat Works from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

171 comments

  1. I feel stupid but... by ilyanep · · Score: 0, Troll

    What's Tomcat?

    --
    ~Ilyanep
    To get message, take amount of carrier pigeons at each stage mod 2. Then decode binary.
    1. Re:I feel stupid but... by mordors9 · · Score: 5, Funny

      Well you see, it is a male cat. And when the female cat (pussy) comes into season.... oh wait different type of tomcat. Sorry.

    2. Re:I feel stupid but... by Anonymous Coward · · Score: 0

      Tomcat: A ball bearing mouse trap.

    3. Re:I feel stupid but... by brittm · · Score: 5, Informative

      Tomcat is a Java servlet container--that is--basically a web server that serves up Java servlets, JavaServer Pages, etc.

      It can run standalone and also serve static files such as HTML pages/graphics, etc., or it can be configured to stand behind a web server such as Apache and only handle the servlet and JSP requests that are passed to it.

      Tomcat is itself written in Java and is, of course ;) open source. See more at http://jakarta.apache.org/tomcat/index.html.

    4. Re:I feel stupid but... by Anonymous Coward · · Score: 0

      Be prepared for others to flame you, as a google search for "Tomcat" has entirely relevant results.

      But essentially Tomcat is a FOSS application server for servlets and JSPs. I am guessing you are not too up on web development, so think of something along the open source analog of IIS (MS's Web server that can also act as an application server by running ASP- Active Server Pages).

      More info here:
      http://jakarta.apache.org/tomcat/

    5. Re:I feel stupid but... by Anonymous Coward · · Score: 1, Informative

      A female cat is a queen, not a pussy.

    6. Re:I feel stupid but... by Anonymous Coward · · Score: 0

      You must be new here. You don't seriously expect slashdot stories to be well-written or informative, do you?

    7. Re:I feel stupid but... by bolind · · Score: 2, Insightful
      ...or it can be configured to stand behind a web server such as Apache and only handle the servlet and JSP requests that are passed to it.

      Ehrm, technically, yes. But I'll be damned if I could get the thing to be stable when I tried to set it up.

      See, at my (brand spanking new) dorm, we needed a homepage. So this dude volunteers to make one, and is sent off with the words "It must work on a standard Linux/*BSD platform. No proprietary crap, please." A week later, he shows us this impressive thing running on his laptop. Only problem is, it runs under Tomcat. So I try my very best to get this thing running on our FreeBSD box, before abandoning it, and just have someone build it with PHP instead. Lessons learned working with Tomcat:
      • Documentation and support is near non-existant.
      • The thing is slow as molasses.
      • It crashes for no reason, even while not under load.
      It might very well be that I am completely incompetent, but for the most parts, I have succeeded in getting stuff up and running once I set my mind to it. But this piece of software does not exactly have my warmest recommendations.

      Just one mans experience. You mileage probably varies quite a bit.

    8. Re:I feel stupid but... by ilyanep · · Score: 1

      can't you tell I signed up like a week ago?

      --
      ~Ilyanep
      To get message, take amount of carrier pigeons at each stage mod 2. Then decode binary.
    9. Re:I feel stupid but... by Anonymous Coward · · Score: 0

      In any case, welcome!

      Knowing snarkiness aside, you'll find that many 'stories' assume you're as big web/linux/programming/crypto/graphics/patent dork as the writer. Unfortunately, the editors sometimes don't do a very good job of adding an explanatory word or two for the more obscure topics.

    10. Re:I feel stupid but... by batkiwi · · Score: 1

      I've not had tomcat itself crash in years. What was the stack trace?

      My guess is, based on crashing and slowness remarks, that whomever coded the app you're using sucks.

      It's like blaming PHP/Perl/c++ for a shitty program that happens to be written in said language.

      Does the fact that phpnuke has tons of security vulnerabilities and is slow as hell mean php sucks?

    11. Re:I feel stupid but... by LarsWestergren · · Score: 1

      Well you see, it is a male cat. And when the female cat (pussy) comes into season.... oh wait different type of tomcat. Sorry.

      Gah. This brings backs bad memories. I was at a company a couple of years ago and was going to download Tomcat. So I took my browser to www.tomcat.com, with lots of other people in the room. Guess what! Porno domain. I try to close it the browser. New popunders come up as quickly as I try to close them (it was the company computer and they used IE, ok?). At any second someone could turn around and see me in front of a screen full of bukkakke dripping pictures. I am sweating, and finally I just panick and turn the computer off.

      If I EVER meet the fuckers who did that page, they are going to pay....

      --

      Being bitter is drinking poison and hoping someone else will die

    12. Re:I feel stupid but... by Anonymous Coward · · Score: 0
      I try to close it the browser. New popunders come up as quickly as I try to close them (it was the company computer and they used IE, ok?).
      This was your fault. Your mistake was this: you assumed that a company-mandated browser, was somehow suitable as a web browser on the Internet. IE is not an internet-related product, and can not be safely used in that context.
    13. Re:I feel stupid but... by fakeplasticusername · · Score: 1

      I'll second that. I currently run a tomcat server, and it is both a memory hog and has monthly crashes. It seems i mostly get java VM crashes: signal 11 errors for most part...

    14. Re:I feel stupid but... by aled · · Score: 1

      It's more probably a problem with your Java version and/or your Linux version. Try upgrading you JVM.

      --

      "I think this line is mostly filler"
  2. Re:Is it just me by lpangelrob2 · · Score: 0

    Whoa there... Java Apps (by which I presume you actually meant "Java applets", or you were trolling) have nothing to do with Tomcat, unless Tomcat itself were serving said applets. This is about web applications, which are (in an overly simplified explanation) pages generated by Java code in some sense or another, and only use as many system resources as an HTML webpage would.

  3. Judge by MikeMacK · · Score: 5, Funny
    Also, the index could have been better, not to mention a cover that is plain and uninspiring.

    But I thought we weren't supposed to judge the book by it's cover?

    1. Re:Judge by Anonymous Coward · · Score: 0

      If you're going to read the last paragraph, why not read the first one, too!

    2. Re:Judge by qcubed · · Score: 1, Insightful

      its, not it's.

    3. Re:Judge by MikeMacK · · Score: 1

      I did, in the first paragraph he states to not judge the book by its cover, and then goes on to say the cover is not good...thus judging the books cover...get it?

    4. Re:Judge by MikeMacK · · Score: 1

      Monty Python's Flying Circus!

    5. Re:Judge by uhlume · · Score: 1

      That's cute. Of course, that's not what he's doing at all: he's clearly judging the design of the cover on its artistic merits, not judging the contents of the book by said cover. This is entirely self-consistent with his earlier admonishment, so the humor of your question falls a little flat.

      Really, if you're going to be (even humorously) pedantic, you might take more care to be correct.

      --
      SIERRA TANGO FOXTROT UNIFORM
    6. Re:Judge by borud · · Score: 2, Insightful
      the cover of the reviewed book is good and the fact that the reviewer thinks otherwise makes me unsure how to interpret his review.

      Is this a person who spends a lot of time reading technical books?

      recently a friend of mine published a book. a pretty serious technical book and by my estimation one of the better books I have seen on the topic.
      the problem is that if I saw this book in the store, I would probably just give it a cursory glance and never even bother to take it off the shelf to leaf through it. seriously.

      I read a lot of books and I would hate to waste time on a book that isn't worth my time, so of course, I have to be selective. the cover is the first criterion by which I screen books, and I doubt that I am unique in starting there.

      it scares me that I DO judge a book by its cover, but I do. all of us do. there is no way you can read through the TOC of hundreds of books when you visit a well-assorted book shop in order to make a more thorough judgement on a book.

      O'Reilly seem to have understood this. their books usually have a sober, tasteful look about them, and it is somehow an irony that the average quality of an O'Reilly book has dropped in proportion to the degree of overall variation in cover design (I am not saying that the quality of an ORA-book is inversely proportional to its deviation from the "formula", but that it holds for ORA's annual output as a whole).

      still, the no-bullshit, calm, and sober look of O'Reilly books make them a natural focus point in any computer book section. (that and the fact that their predominantly white covers stand out. how come the cover-designers of other publishers seem so ignorant about the use of colors?)

      yes, the cover matters, and despite what the reviewer thinks: the cover on the reviewed book does it no disservice.

      what IS questionable about the book is the fact that it has many spelling mistakes. this suggests that the editor has not done his or her job putting the book through even the most basic quality assurance, which in turn means that there could be factual errors in the book, which for this kind of book is really, really bad.

      this would make me reluctant to shell out $50 for this book.

    7. Re:Judge by MikeMacK · · Score: 1

      I agree it's not one of my better jokes, but then again coming up with funny stuff when talking about technical book reviews is an art unto itself.

  4. Sounds like a nice book... by sH4RD · · Score: 1

    ...that some buisness need to read. The local school system here runs Blackboard which seems to use Apache Tomcat, and it really has problems, both with sessions and general speed. Perhaps some bigger corporations shoudl go back-to-basics with nice books like these.

    --
    WASTE - The Secure P2P
    1. Re:Sounds like a nice book... by Rosco+P.+Coltrane · · Score: 1

      The local school system here runs Blackboard

      Our local school system here is blackboard too. It's proven technology and it really works well. The licensing fee is really low too!

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:Sounds like a nice book... by sH4RD · · Score: 1

      Probably works better than Blackboard here. Our Blackboard tends to crash, mix-up sessions (sometimes resulting in being logged in as a school administrator, including all permissions to play with student accounts), and just plain 'ol not work. And they use Tomcat. A really slow, most likely misconfigured Tomcat. I would prefer your nice low tech solution.

      --
      WASTE - The Secure P2P
    3. Re:Sounds like a nice book... by Anonymous Coward · · Score: 0

      It's actually using wk2 / iis / maybe jsp.. my guess is that w2k is the issue. there is amybe no load banencer, etc. installed..

      http://uptime.netcraft.com/up/graph?host=blackboar d.com

    4. Re:Sounds like a nice book... by sH4RD · · Score: 1

      Each school system is different. fcps.blackboard.com is the local server used.

      --
      WASTE - The Secure P2P
    5. Re:Sounds like a nice book... by Anonymous Coward · · Score: 0

      My university also uses Blackboard. As you've observed, it has big issues with speed - not to mention a poor feature set (although that could just be down to the way my uni has deployed it).

    6. Re:Sounds like a nice book... by Anonymous Coward · · Score: 0

      Blackboard is a pain in the ass to administrate. The defaults for the app server are set ridiculously low, especially since their minimum hardware requirements are high enough to handle a lot more. After installation there is no guide about how to tune the app server, which requires certain changes to certain files so as not to delete your changes during upgrades. I think BB expects you to pay them $$ to come install the software and come on site to troubleshoot it once you realise it isn't tuned at all. Some of their utilities seem purposefully obfuscated, but then again so do many other large corporate packages (and i mean some ass backwards, sometimes broken shell/perl/sql). Not to mention their support, which is rather pitiful - long waits to answer serious questions, little technical expertise at their end, etc.

      Once Sakai is proven and there is a manageable upgrade path from BB, i'm testing it out and if it works well, recommending it for our org. If it's good enough for MIT and UofM, it should be good enough for us.

    7. Re:Sounds like a nice book... by Anonymous Coward · · Score: 0

      As you've observed, it has big issues with speed
      For the most part, the speed issues are resolvable, provided the hardware is adequate and the software is tuned correctly.

      not to mention a poor feature set (although that could just be down to the way my uni has deployed it).
      Most likely the way it is deployed or the way the instructor is using it. We've tested various other course management packages and BB comes at the top in terms of features (though increasingly i think this comes at a price of stability, and some features sometimes get removed in upgrades).

    8. Re:Sounds like a nice book... by cameronpurdy · · Score: 1
      Speed issues (JSP, ASP, Perl, whatever) are almost always related to doing too much I/O .. often that means too much database I/O.

      Session issues call for something like Coherence for clustering, letting you scale horizontally by running any number of Tomcat servers.

  5. Re:Could the editors... by Anonymous Coward · · Score: 1, Informative

    Tomcat is a software project to implement the Java Servlet specification. It's developed by the Apache group.

    It lets you deploy your Java Servlets and JSP pages, among other things.

  6. Re:Is it just me by Rosco+P.+Coltrane · · Score: 5, Insightful

    or do java apps take up a huge amount of system resources? Everytime I launch one, my system crawls.

    Look, I used to hate Java, and quite frankly I can't say I love it much yet. But to be honest, it's come a long way since the days it was unbearable. So please come off the Java bashing, it's passé. Either that or upgrade your system for crying out loud...

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
  7. The is an EXCELLENT follow-up to last year's... by Anonymous Coward · · Score: 0

    What Tomcat Is

  8. Seems quite basic.. by dwipal · · Score: 1

    From TFA, it seems tha book is quite basic. Would be great if it would actually discuss "how tomcat works, internally", something like a really advanced course. The material in book can be found in tutorials and stuff, but its slightly more difficult to figure out for the first time that you can "precompile" the jsp pages so the site is fast right from the very first hit.

  9. PHP by Anonymous Coward · · Score: 0

    Is is funny or ironic that the authors web page runs on php? http://www.brainysoftware.com/

  10. A Microsoft Defender Speaks Out by INetEngineer · · Score: 4, Interesting

    I have been paid to build MS apps for years now, but I have "watched" Java from a distance and have to say that if I started a business of my own, all applications would be written in Java/JSP. I was one of the first to attempt to build Tomcat on a Windows system and after many disasters came to love it. The inner workings of Tomcat often baffled me and now I am gonna have a book! Sadly nothing I learn will translate to my current job, but it'll be damn fun.

    --
    --I smoked my sig.
    1. Re:A Microsoft Defender Speaks Out by Anonymous Coward · · Score: 0

      Me too. I work for a HUGE Microsoft firm, but am a closet Java guy. I wish there was a Java/Open Source consulting company that would offer me the same pay :-)

      Oh well, at least I have a weekend hobby.

    2. Re:A Microsoft Defender Speaks Out by rutledjw · · Score: 1
      LOL, applications in Tomcat are supposed to be "disasters" from tiem to time! I was writing code on early versions of Tomcat and had a few problems that really caused pain, but overall liked the slim "footprint" on my system and it generally was fast (esp if I pooled some of the heavy-er weight objects).

      Sadly, I'm out of coding now, but it was fun. I'm suprised to hear an MS guy going to Java/Tomcat (I assume Linux as well), most of the MS-guys I know are pretty hardcore. What's the driver here?

      --

      Computer Science is Applied Philosophy
    3. Re:A Microsoft Defender Speaks Out by Timesprout · · Score: 1

      I think one of the great things about Tomcat (and the specs behind it) was it brought web development and some new development concepts to the Java masses and also to MS. I started using it back in 99 and while it could be a pain to configure and integrate, servlets were a joy after the grief of ASP. MS has taken on some of these lessons and I have to say ASP.NET is some funky stuff. The combination of Tomcat 5 and the next struts version should make an interesting competitor though.

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    4. Re:A Microsoft Defender Speaks Out by Anonymous Coward · · Score: 0

      Perhaps he doesn't like the look of Enterprise Servives, which is anything but Enterprise.

    5. Re:A Microsoft Defender Speaks Out by INetEngineer · · Score: 1

      "Well, with any luck, you will not start a business of your own."

      OUCH!

      Apparently Generalizations in SlashDot = Flames from Readers :)

      Of course not EVERY application. Web applications are my forte, so I was speaking mainly toward Tomcat and JSP. Of course, I recognize the performance issues of large solutions in Java. Tomcat has done well to minimize the overhead of Java somehow. Perhaps because web applications usually have such a small footprint themselves. Maybe the book will tell us such things...

      Is the issue of performance really related to the "only" (don't flame me for that) cross-platform language (Java) that is recognized and accepted by enterprise vendors, or is it the failure of hardware and OS vendors to not work together? Java and Tomcat have had great success. We'll see how .NET fairs after porting to Mono and it gets a few more years under its belt of "cross-platform" support. Even if it does, where will all the tools be?

      So many tools exist for Java now that do not yet exist for .NET. Not to be a skeptic of the MS giant, because my job relies on their success, but we'll see what the future holds. Is "coming together" ever really the answer in this world? Where would we put all the port-o-potties?

      --
      --I smoked my sig.
    6. Re:A Microsoft Defender Speaks Out by AstroDrabb · · Score: 4, Interesting
      What a stupid troll. I use HUGE enterprise apps written in Java for a fortune 500. They load fast. We use different JVM options that actually cause the apps to load _slower_ but give better runtime performance. You see, we don't _ever_ have to restart our enterprise Java apps running on Linux/Solaris. Our biggest Java app running on about 15 servers is up and ready in 30 seconds. I can't honestly tell you the last time we needed to restart our Java apps on Solaris or Linux. Now our .Net apps running under Win2k3 is a different story. No I am not bashing .Net. I program in both .Net and Java and think both are very nice. I just give the nod to Java because it does not lock me into MS only servers. At the fortune 500 where I am a senior programmer we have plenty of MS Windows servers and pretty much every desktop is MS Win2k or WinXP. However, all of our _critical_ servers and apps are not MS Windows. They are running on Solaris and Linux.

      I happen to agree with the GP. If I started my own company, I would use Java/JSP. It would give MY company the most choice on what platform(s) to run. If I wanted to run all MS Windows. Fine. Java runs great under MS Windows servers. If I wanted Linux or Solaris, it is great as well since Java run great there too.

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    7. Re:A Microsoft Defender Speaks Out by INetEngineer · · Score: 1

      "What a stupid troll."

      I suppose one opinion deserves another. No baiting here. But, I suppose if I were to bait my comments, I'd catch you again.

      Thanks for the input. I have to be honest when I say that you are the 1st person to tell me their Java app runs quickly. Most people I know (perhaps because I work with MS people) think it is slow as well and I believe the majority of programmers think the same. Perhaps a poll?

      Anyone know how to steer this boat back on topic? I suppose we'd better abandon now...

      --
      --I smoked my sig.
    8. Re:A Microsoft Defender Speaks Out by AstroDrabb · · Score: 2, Insightful
      you are the 1st person to tell me their Java app runs quickly
      Umm, maybe because you have no experience with real Java? I can run .Net apps that are very bad and very slow. Does that mean I should think .Net sucks?
      Most people I know (perhaps because I work with MS people) think it is slow as well
      I think you have your answer there. .Net is not any more faster or more efficient than Java. I work for a fortune 500 with 140,000 employees. I have met plenty of people like you that don't really understand Enterprise developemnt. The main experience is "MS-Only", mostly VB 6 type people. I dont' call that Enterprise. If any of your MS friends claims that MS stuff is faster, they are not in touch with reality.

      We payed hundreds of thusands to have MS and third parties try out their best stuff on our intranet. At the end of the day, MS didn't have anything that could compete with PeopleSoft HR and PeopleSoft Portal. The MS solution just didn't fit our needs, it cost more and was less flexible. The PeopleSoft arch we have is Java based and runs like a champ for 140,000 employees at our corp, not to mention hundredes of thousands of others that PeopleSoft have sold to.

      Most people I know (perhaps because I work with MS people)
      I am sure you can take your MS-Only "deveolpers" and build a "great" corp. A bunch of "VB-Only" type "developers" whos knowledge in development is limited to a paper bag, that would be such a great foundation to build on. Please name any _major_ MS innovation that MS has come up with themselves that had no influence from some prior art?

      All of the biggest corps in the USA (including the one I work for) have non-MS servesr running because MS doesn't have software that can even compete with the competition.

      --
      If Tyranny and Oppression come to this land,
      it will be in the guise of fighting a foreign enemy. -James Madison
    9. Re:A Microsoft Defender Speaks Out by EvilArchitect · · Score: 0

      Assuming that I'm just not smart enough to find it, from reading the thread, W(here)TF is it stated "Well, with any luck, you will not start a business of your own." except in this message?

      I started reading the thread and was quickly lost in what appeared to be someone making a statement ( INetEngineer ) and someone else setting a fire.

      Huh! I guess that's a "Welcome to Slashdot. We value your stupid opinions only as something that we'd use to generalize a holy war!" thing...

      --
      I'm just a caveman programmer. I don't understand your strange, "modern" ways of thinking.
  11. And those are? by students · · Score: 0, Troll

    What? If I had a servlet, what would I do with it?

    1. Re:And those are? by rutledjw · · Score: 2, Informative
      Not wanting to be rude - but do your own research.

      If you're a student, particularly in a technical field, you should be able to google something and learn what it is. As you progress in your technical career, you'll spend a lot of time looking up technology and solutions. It's the nature of a fluid field.

      My EE profs had no patience with students who wouldn't do their own research and I've been the beneficiary of that attitude.

      Learning a topic is something that should be obvious. If you are to be competitive and desirable in a tough industry - you should be used to it

      --

      Computer Science is Applied Philosophy
    2. Re:And those are? by Giggle+Stick · · Score: 1
      I kind of agree, but Slashdot is a news site. What if the New York Times did this story, talking about how great Tomcat was but never told you what it was.

      Granted, this is a technical site, but no one here is familiar with every single technology. Haven't you ever seen a story listed here that said something like, "Wow! XProduct is the next best thing in the YTechnology field, blah blah blah." Now I don't have time to read every article slashdot mentions, so how should I determine if this is something that might interest me a bit. I could research it, but then I may as well just read the article. So now I have to read every article that I don't know exactly what it's about, to avoid missing the "Next Best Thing."

      It wouldn't kill the editors to pick a baseline of knowledge, and write to that level, explaining anything that can't be assumed to be known by someone of that level. Like how newspapers write at a 6th grade level of English, or something.

      Perhaps this is the job of the original story submitter, since they presumably are the ones who care most about getting the information out to the hordes, and it doesn't seem like the editors really edit the submissions before posting them, oddly enough.

  12. help wanted by Doc+Ruby · · Score: 0, Offtopic

    Have you got Tomcat development experience? Automating Open Exchange? Want a job? Reply to my journal.

    --

    --
    make install -not war

  13. How does it compare to OReillys book? by Anonymous Coward · · Score: 5, Informative

    Anyone know how this books compares to the O'Reilly book, " Tomcat: The Definitive Guide"? Also, it might be helpfull for people to know what a Servlet and JSP is before spouting out terms.

    About the only thing common between an Applet and a Servlet is that both are writen in Java. Anyone out in /.land using Tomcat for their production site? Also, any care to give any recomendations for an eclipse plug-in?

    1. Re:How does it compare to OReillys book? by michaelggreer · · Score: 2, Informative

      I have used Tomcat in production many times, and for the most part it is excellent. The only trouble has been with commons.logging (grr..), the default connection pool (use c3p0 instead), and context reloading with Hibernate (only a dev problem). Resin gives it quite a run for performance, but its not free. As for plugins, Sysdeo has a great one that lets you run it in the debugger, with hot-code replace and everything

    2. Re:How does it compare to OReillys book? by Enygma42 · · Score: 3, Interesting

      I've deployed a few sites on Tomcat for my current employer. We have two setups, a Windows 2000 server and a Suse 8 server both shared. The Linux server seems to be able to stand up to the pressure of the busier sites a bit better but that's probably because our admin guy as it set up better.

      Some of the sites on the windows box go down once a day or more, but again that's probably a configuration thing. I've never had any problems developing on either.

      IMHO Tomcat has come a long way in the last few years. Version 5 is a huge improvement over version 3.2 (I never got around to deploying a live site on 4.x, those apache guys are way too fast for me!)

      From the point of view of someone who's been developing with Tomcat over that last few years the book sounds fairly interesting but not meaty enough. It sounds like a great starting point for someone interested in understanding Tomcat but not much more. I'd like to see a follow up book that goes into more detail then I'd probably buy the two, as it is it would probably whet my appetite and leave me unsatisfied.

      --
      "hehe, website" - Homer Simpson
    3. Re:How does it compare to OReillys book? by Hermit+Geek · · Score: 1

      http://www.sysdeo.com/eclipse/tomcatPlugin.html The Hermit as in Geek

    4. Re:How does it compare to OReillys book? by boodaman · · Score: 2, Interesting

      My servers all run Tomcat. A good chunk of them are still running Tomcat 3.1 for legacy reasons.

      The sites are high-traffic (many hundreds of user sessions per day). "Hundreds" probably doesn't sound like much, but the apps are pretty intense...not just simple SQL query/display stuff. High-end graphics manipulation, workflow management, and more, with sessions lasting 10-20 minutes each.

      The base OS on every server is Red Hat. Rarely do we experience problems, and in 99% of the cases, the problems are user-related (as in "problem exists between chair and keyboard"), not code related. Very very stable all around, both the Tomcat 3.1 installations and the Tomcat 4.1.x installations. I wouldn't use any other servlet container. Aside from the "plus" of the Apache license, I see no reason to "fix" something that isn't broken by trying other servlet containers, no matter what their claims.

      Because of our positive experiences with Tomcat, we started rewriting a major internal application about 8 months ago. It was originally written in ASP with COM+ objects. We initially thought we would need to get into some sort of J2EE scenario in order to "mimic" the COM/COM+ architecture, but after some proofing was done, we quickly realized that we were fine with servlets and JSP using a tweaked MVC architecture. No problems with load, and we can scale as we need to.

      As a comparison, and no, this isn't a troll, the ASP stuff we have crashes frequently. None of the applications running in production with Tomcat crash.

      I highly recommend Tomcat, and the people on the project, the dev and user lists, etc. are generally good people and very helpful.

    5. Re:How does it compare to OReillys book? by cubicle4 · · Score: 1

      Yep in production for the job (Fortune 50 Utility company) I just left - both internal and external sites. Also working for Major Financial institution and using it in production there are well. Fwiw, moved from Weblogic at previous job to tomcat.

    6. Re:How does it compare to OReillys book? by Brando_Calrisean · · Score: 1

      MyEclipse J2EE Workbench (yeah, it's a mouthful) was a somewhat decent plugin for Eclipse when I tried it. Not free, but it worked.

      --
      Don't call me a cowboy, and don't tell me to slow down!
    7. Re:How does it compare to OReillys book? by Anonymous Coward · · Score: 0

      context reloading with Hibernate (only a dev problem)

      Just wondering, what is the issue?

    8. Re:How does it compare to OReillys book? by michaelggreer · · Score: 2, Informative

      Well, since you asked: SessionFactory is not well serialized so when you reload the context, Hibernate creates a new one. This is because (I believe) you can't put it in JNDI in Tomcat. Thus, each time you reload you get an extra (and big) SessionFactory, and eventually run out of memory. However, if you use the Eclipse plugin (hot-code replace instead of context reloading for class changes), you will not need this so often. And certainly you shouldn't be reloading contexts in production: restart Tomcat instead.

  14. Would have been nice by suso · · Score: 4, Informative

    To have known how Tomcat works this past weekend when I was setting it up for a client. WHat a nightmare. Reminds me TOO MUCH of setting up Chilisoft ASP for Apache. Sure its a good idea, but I think its implemented poorly and from an administrators point of view, I found it hard to know where to start. The documentation for setting up Tomcat needs to assume that the administrator doesn't have any knowledge (or little) of Java.

    1. Re:Would have been nice by Timesprout · · Score: 5, Insightful

      Well since you are doing it for a client do you not have a duty to at least do some research before attempting to install it?

      You say its poorly implemented but yet say you dont know how its works or much about Java. How can you possibly judge the quality of implementation?

      Tomcat is a mature and established technology. There are a plethora of 'getting started with tomcat', 'setting up tomcat' and 'integrating tomcat with your favourite ide' articles available on the web, before even consulting Amazon.

      It is a doddle to install, setting up a site on it takes a bit more time. As with almost all software the documentation could be better but its not like there is not other info available.

      --
      Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
      What truth?
      There is no dupe
    2. Re:Would have been nice by mrtom852 · · Score: 1

      Having used Tomcat as an SA and now Java developer I can relate to the parent post.

      When I first had to admin Tomcat deployments I found configuring environments very odd. Now that I have to package our products for other SAs I have the feeling that they won't stand much of a chance in changing any live configuration without our guidance. The point is that they should not have to know much about Java to be able to find the correct configuration information.

      Our SAs weren't familiar with Apache httpd either but they have taken to that far quicker even though in our environment it is more complex.

      I really enjoy working with Tomcat but I can see that it's weirdness may be to my benefit as J2EE SA roles are pretty lucrative at the moment. I'll definately get this book though.

    3. Re:Would have been nice by djradon · · Score: 1

      I love Tomcat, but have tried at least 10 times to get it working with IIS using the jk2 connector, and have never succeeded. There are plenty of articles around on the subject, but the procedure varies depending on which version of Windows, Tomcat, and jk are involved.

      I'm going to go try again right now, I'll let you know how it goes...

      BTW, Tomcat != J2EE

    4. Re:Would have been nice by LnxAddct · · Score: 1

      Wait a second.... you had trouble setting it up? Should have taken a second. You download it, extract it, install it,or compile it. Then run the little startup.sh or startup.bat. Goto http://localhost:8080 and pretty much everything else is done through a web interface (assuming you added an administrator to the user xml file). From the web interface just add your War and whatever other little things you need to do. I semi-simplified the process, but it is anything but complicated. Involved perhaps, but its a great server with an almost flawless security history and performs really well. This may help.
      Regards,
      Steve

    5. Re:Would have been nice by suso · · Score: 1

      Unfortunately there wasn't much time to do said research. I did do some reading up on how its done, but the documentation was written from the point of view of a Java developer who knew the names of objects that were used (connectors), etc. Having been a sysadmin for 7 years and configured a lot of different web services, like SSI, PHP, mod_perl, ChiliSoft ASP and Frontpage extensions, I can honestly say that the Tomcat installation is obfuscated, where it really doesn't need to be. WAY too much stuff to learn about just to get a basic site to run. In the end, I couldn't figure out how to setup a document root in which to put some asp files for initial development.

      Even when I starting using mod_php several years ago, getting the module working to the point of starting site development was relatively painless and quick. Whereas configuring stuff like ChiliSoft ASP was not. Tomcat is very much like Chilisoft.

    6. Re:Would have been nice by suso · · Score: 1

      See, that is what I'm talking about. What is this 'War' that you talk about? You're using terminology that is not in common tech usage and is most likely just related to java.

      And its not just a matter of doing what you said. The client wanted Fedora Core 3 installed, which lacks Java stuff and so compiling Ant alone because problematic. In the end I wound up convincing them to let me install Fedora Core 2, which comes with all those packages.

    7. Re:Would have been nice by LnxAddct · · Score: 1

      Oh... okay point taken:) If it helps any, a WAR just stands for web archive. It's pretty much a jar (java archive) renamed and contains everything needed to run the program. If your not the programmer for the project then the details of that aren't important, but the programmer should give you a WAR and maybe tell you some database sources that need to be set up. Its not bad, the J2EE platform is very extensive and covers quite a range of capabilities. I can't see any body understanding each area so don't even try:) There are books and books and books written on even what appear to be the simplest of aspects. Anyway, if you do get in a jam and need some help, drop me an email at "sgk284 (at) gmail.com". I'm not guaranteeing I'll know the answer, but I'll try:). Take care,
      Steve

    8. Re:Would have been nice by easter1916 · · Score: 1

      Well, it *is* a Java web container... you know, JSPs, servlets, etc.? WAR stands for Web ARchive. Similar to JAR (Java ARchive) and EAR (Enterprise ARchive), all Java-specific. You could have downloaded binaries of Ant, too, and avoided compilation.

    9. Re:Would have been nice by olddotter · · Score: 1

      Why should you need to know Java to set up, configure, and maintain a webserver? Do I need to know mechanical engineering to drive a car? Do I need to know video encoding theory to watch a DVD? I am a programer and a webserver administrator. I must say that while Apache has the best documentation I think I have ever seen. Tomcat has pretty close to the worst documentation I have ever seen. Fortune 500 web administrators are not programmers who know alot about Java. (Sometimes I think most of our "java developers" are not programmers who know about java.) But they shouldn't have to know java to configure the server or do basic maintainence.

  15. Opinions Vary by aaron240 · · Score: 1

    I actually think that cover is elegant.

  16. struts? by iriles · · Score: 3, Insightful

    nice. But, I want "How Struts Works." Debuging struts applications is one of the closest things to hell that I've experienced in some time.

    Ishmael

    1. Re:struts? by Anonymous Coward · · Score: 0

      A quick search on B&N shows there are dozens of books about struts out there. Take your pick and write a review for Slashdot.

    2. Re:struts? by Not_Wiggins · · Score: 1

      A quick search on B&N shows there are dozens of books about struts out there. Take your pick and write a review for Slashdot.

      And be sure to put a whoring link to book, so you can make tons of cash on Slashbots who click the link and buy it. ;)

      --
      Diplomacy is the art of saying, "Nice doggie!" until you can find a rock.
    3. Re:struts? by iriles · · Score: 1

      This one is mediocre to bad, not to mention out of date.

    4. Re:struts? by Anonymous Coward · · Score: 0

      But, I want "How Struts Works."

      Struts does not work. Period.
      Well. I think I could go into more detail here and describe how the struts servlet uses the action forwards to tell the tiles plugin which configuration to use and how the tiles plugin then combines the jsp fragments or how the ActionForm mess works (not). But basically the struts code is a stupid mess and everything is put as a session, request, or page attribute. That is really poor. And yes, debugging it is hell especially if jsps, actions, forms, and forwards belonging to each other have different names.

  17. lazy students by Doc+Ruby · · Score: 4, Funny

    Click on the "Tomcat project's Web site" link in the second sentence of the "rest of the review". We can't click for you. But be advised, if you have to ask these lazy questions, you probably can't program a Tomcat app, no matter what it does.

    --

    --
    make install -not war

    1. Re:lazy students by daddymac · · Score: 1

      Like my daddy always said, "If you have to ask, you can't afford it."

      --
      If something I said can be interpreted two ways, and one of the ways makes you sad or angry, I meant the other one.
    2. Re:lazy students by Anonymous Coward · · Score: 0

      Was your daddy legally retarded, or what?

      "How much is that carton of milk?"

    3. Re:lazy students by students · · Score: 1

      I did read it. It is a project news page, not an explanation of what the project does. I looked at the wiki, the FAQ, and the docs too. Some people find "Java Servlets" to be little more informative than "Tomcat". So, now I know it uses Sun's Java programing language and has something to do with serving...?

      This guy was about as informative as the web site.

      This one agreed with me.

      Let the flames begin! (Wait, too late for that. Must be a bad karma day.)

    4. Re:lazy students by Doc+Ruby · · Score: 1

      The second sentence at the Java Servlet Technology page (linked from the first sentence of the Jakarta Site - Apache Jakarta Tomcat page, the link I gave you, repeating the link from the second sentence of the book review) says "A servlet can almost be thought of as an applet that runs on the server side--without a face." Maybe you're not so much lazy as bad at reading. You can't pull this off, but people offer you help anyway, which you take as flames. Boy, you've got a lot to learn.

      --

      --
      make install -not war

  18. FrontPage by students · · Score: 1

    Netcraft says they also have FrontPage(!), SSL, Apache, and Linux(no !). Must be a standard hosting package from Interland.

  19. Re:Could the editors... by Local+Loop · · Score: 1

    Servlets are Java programs that handle specific events (such as requests to a URL) and Tomcat is an apache plugin that lets you run servlets from apache.

    New web cartoon: Jendini.com

  20. Re:A new copy is not available from Barnes & N by meshko · · Score: 3, Informative

    Oh yeah?
    And maybe someone just wants to make money on their amazon referral?
    It is available from BN for $10 less.

    --
    I passed the Turing test.
  21. Re:Is it just me by tanguyr · · Score: 2, Funny

    Whoa there... Java Apps (by which I presume you actually meant "Java applets", or you were trolling) have nothing to do with Tomcat, unless Tomcat itself were serving said applets.

    Well, Tomcat itself is an application... written in Java... often abbreviated as a "Java App". Deploy a couple of webapps in tomcat and then check out the memory footprint of Java.exe and you'll see what he means. I've never used tomcat for production use although i do have 5.0.28 running on my workstation to test stuff, and i've found the solution to any perceived performance problems (esp. in single user mode as i do) to be RAM, RAM, and more RAM. At today's prices, why quibble: throw a gig at the problem - even if your problem isn't memory bound you'll *still* have a gig of ram! You can cackle like a maniac every time you think about it!

    --
    #!/usr/bin/english
  22. Re:Could the editors... by brittm · · Score: 3, Informative

    Actually, Tomcat isn't an Apache plugin. Tomcat is a stand-alone server that can also be configured to support Apache for serving up Java web applications (which Apache cannot do on its own).

  23. Re:Is it just me by Anonymous Coward · · Score: 0

    No, please have people keep the Java bashing. That is a way to know the stupid from the smart. The stupid people don't release that Java has improved greatly since 1996 and all the major software companies (except Microsoft) are betting heavily on it. The smart ones realize this and wouldn't bash it.

  24. Re:I don't want to start a holy war by Anonymous Coward · · Score: 0

    Like I told a guy (or girl :)) up above, you shuld really think of switchign to gentoo and using their tomcat ebuilds. I did and they really do totally rock.

    G3ntooDud3

  25. Re:Is it just me by temojen · · Score: 5, Informative
    what does Tomcat offer me that PHP does not, other than needless bloat and heavy system requirements?

    1. Persistant in-process objects,
    2. The ability to respond to a HEAD or PUT request, not just POST and GET,
    3. A strongly typed language (which is alledgedly more secure),
    4. and background threads not dependant on any particular request.
  26. Re:I don't want to start a holy war by Anonymous Coward · · Score: 0

    Java addicts, flame me if you'd like, but I'd rather hear some intelligent reasons why anyone would choose to use JSP. Hell, I could hand deliver web pages halfway around the world faster than this.

    Seems obvious to me that you do want to start a flamewar, but, this is a serious question, actually - why would anyone choose to use JSP?

    You get all the problems of mixing buisness logic with content, plus all the problems that come with Java (slowness, memory use), plus a multiple-compiled language - good luck if your generated Java code fails! (Error on line 1,342 in Your.jsp - hmm, but it's a 20 line JSP, how is that possible? Oh, it's reporting errors in the massive bloat of the generated Java file, not in the JSP! Of course!)

    I can't think of a single reason to use JSPs, other than to ensure that you'll never be able to maintain your system.

    Java Servlets I can almost see, but JSPs just cause problems.

  27. Object instantiation is cheap! by Bubblehead · · Score: 5, Informative
    Contrary to popular believe, object instantiation is quite cheap these days (see Hotspot Garbage Collection FAQ for great information on this topic). Over the years, garbage collection algorithms have changed quite a bit. As most objects are short-lived in a well-designed OO system, GCs are tuned to exploit that. In fact, if the object is disposed in less then 4-6 GC cycles, the cost is almost nothing, and it gets more expensive, the longer the object is kept around. This is the case because young generation objects are never copied within the heap, while old generation object may be copied multiple times.

    From this follows that object pools are counterproductive for performance (unless, of course, if resources are associated with them, like Database connections, open sockets, etc.).

    I heard that quite a few app servers (including JBoss) started to refactor to get rid of object pools, but I don't have a link to back this up.

    --
    Under capitalism man exploits man. Under communism it's the other way around.
    1. Re:Object instantiation is cheap! by FerretFrottage · · Score: 2, Informative

      Very true...object pools in multi threaded systems with proper synchronization can often be counterproductive (in terms of time saved) to just creating a new Object. If you are truly pooling objects to save some state information, then a prototype pattern may be a better way to go. Obviously it all depends on the design and what the developer intends to do with the objects, but in general, keeping the objects in the "eden"/young memory space is most desirable (in terms of gc) Not sure how this plays with Java 5 yet as I have not profiled on that version.

      --
      "Look Lois, the two symbols of the Republican Party: an elephant, and a fat white guy who is threatened by change."
    2. Re:Object instantiation is cheap! by blamanj · · Score: 2, Informative

      Indeed. There are relatively few things that are expensive to instantiate, such as threads and databases connections. This isn't new, either, generational collection has been around since 1.3.

      Another case of premature optimization hurting (in added complexity and potential bugs) more than it helps?

  28. Re:Is it just me by Billly+Gates · · Score: 4, Interesting

    Add to that security.

    I keep getting flamed by the moderators but do a search on the CIA's website for insecure langauges and software.

    Php is the least secure langauge in existance and has more holes than even ASP.

    I do not mean to sound trollish but its the truth and the next big wave of worms will probably be targetting at websites running php.

  29. maybe it's just bloated? by geg81 · · Score: 2, Funny

    You should consider yourself lucky (or very brilliant) if you can understand how the system works in less than 3 months by browsing through its millions of lines of code.

    If that's true, it sounds like it is bloated and not very well designed.

    1. Re:maybe it's just bloated? by argoff · · Score: 2, Interesting

      Maybe I'm just out of it, but the thing that kills me here - is I have yet to see how this is going to provide some functionality in the real world that couldn't be done easier and simpler 1000 other ways.

      Oh, and also - all this reminds of when I herd ESR say in a talk that the markets cry for java was really a cry for FOSS. While I've never been a great fan of ESR - I think maybe he was right. The whole idea of java was to move the development center of gravity away from the proprietary desktop. Heck firefox and PHP have alone have done 10 times what java has to accomplish that. And php isn't even client side for chrissake.

      ANd, also I think it was a mistake to force the java solution to be a high level language. What they should have done is made some standadrized client side byte codes that did simple functionality like IO, and things like AND, OR, NOT, +, -, GOTO, etc and put it in a simple sceure "box", and then leave to the higher lever implementations to "compile" the byte codes and add layers on it. - Then the market could have sorted out the best high level solution. As it is, all the 'simplicity' and 'uniformity' we were supposed to get from java has simply been thrown out the window because of all the layers of high level crap you half to go thru to get things done.

      IMHO, the whole direction had completely thrown KISS out the window - either me or them are going insane.

    2. Re:maybe it's just bloated? by geg81 · · Score: 2, Insightful

      Oh, and also - all this reminds of when I herd ESR say in a talk that the markets cry for java was really a cry for FOSS.

      It's ironic, though, that Java is anything but FOSS...

      ANd, also I think it was a mistake to force the java solution to be a high level language.

      I don't think that was necessarily bad. What was bad that they completely forgot about their original mission: lightweight clients. A decade later, we have another bloated server-side platform we don't need (Java), and we still don't have a decent, sandboxed client-side language (only Flash).

      IMHO, the whole direction had completely thrown KISS out the window - either me or them are going insane.

      The problem is with Sun and Sun's direction: they couldn't make thin clients work within a couple of years, so they changed course. If Microsoft had been in Sun's place, they would have pushed harder and longer, and they would have made it work.

  30. Slashdot - please fix your HTML! by bteeter · · Score: 0, Offtopic

    I'm posting this in IE - which I had to open just to read this writeup. Slashdot's HTML is flaky and when viewed in Mozilla Firefox, it blows out the table to 3x screen width (1024) and puts black text on black background.

    Please fix your code. A lot of us use Mozilla around here!

    Thank you,

    Brian
    --
    http://www.assortedinternet.com/

    1. Re:Slashdot - please fix your HTML! by Post+It+Now · · Score: 0

      Damn links and posting bans, this was so misposted above. Anyway: You must be new...nope, low uid. The only person at slashdot who actually uses linux or firefox is the guy who set up and admins the servers that slashdot runs on. By the way, Slashdot runs on FreeBSD, they just fake the headers in Apache. That guy who admins the servers...he has to install whatever latest video game comes on maldas xp box, because he can hardly be bothered to do that. Aside from mashing their hands on the keyboard and thus outputing more slashcode, the editors do little more than play games and watch anime.

    2. Re:Slashdot - please fix your HTML! by Anonymous Coward · · Score: 0

      Slashdot's HTML is flaky and when viewed in Mozilla Firefox, it blows out the table to 3x screen width (1024) and puts black text on black background.

      For about the millionth time: IT'S A BUG IN FIREFOX! It was fixed absolutely ages ago, but due to various regressions won't make it into Firefox until version 1.1.

      Since Bugzilla blocks Slashdot referrals, you'll have to copy & paste the link: https://bugzilla.mozilla.org/show_bug.cgi?id=21752 7

    3. Re:Slashdot - please fix your HTML! by boodaman · · Score: 0, Offtopic

      Looks great to me. Ubuntu Linux + FireFox.

  31. Re:Is it just me by TheLittleJetson · · Score: 1

    i think the "enterprise" buzzword translates to "large projects". java's pretty easy to maintain stuff like that. java also offers run-time optimizations which would be helpful for something that gets a lot of traffic. i guess it scales better? (or at least that's the hype, i'm no expert)

    with that said, php/apache is truly a joy and is my preferred web-deployment platform. java is my preferred platform for regular old applications.

  32. Re:Is it just me by Anonymous Coward · · Score: 1, Informative

    Well, there is also porting to other containers (i.e. WebSphere). You also can take advantage of all the industrial strenght (and tested) libraries available. Not to mention the volume of books on the subject.

  33. Re:Is it just me by lpangelrob2 · · Score: 2, Insightful
    What you are asking has more to do with the web application specification itself, more than why Tomcat over PHP.

    I think of it this way... PHP for web applications is inevitably like building your own house from scratch... mixing the concrete, cutting down the trees, etc. All by yourself. As I've developed some web applications in PHP, this is acceptable if you're building a yurt or something.

    Java servlets are what you want to use if you want to ensure some level of expandability, or at least standardized web development practices (in theory). Companies generally don't have one mega web application they run, they have anywhere from several to dozens. You don't really want to start from scratch there. Authentication? Yeah, servlets can do that. Flow control? Yeah, that's covered too. In general, if it's something you're probably going to need, the specification covers it and you can implement it based off the specification, as opposed to winging it. Or, to get back to the house thing, buying precut steel instead of making it yourself. Or, having ready-made shingles instead of copying a design that was made earlier that may be kinda shoddy even though you don't know it.

    This doesn't necessarily knock down existing frameworks like Ruby on Rails, which looks pretty sweet, or anything with frameworks. Servlet containers just happen to be (more) secure, time tested foundation from which to build web applications. Tomcat is a good servlet container. We also use BEA WebLogic.

  34. Off subject, just a bit. by Anonymous Coward · · Score: 0

    This may be off subject, but is somewhat related. The main computer in my house is a dual-boot P4. The disk has three partitions, NTFS, Reiser, and FAT. It is VERY nice to have a single location for my web server application (located on the FAT).

    When I boot XP, Tomacat run my web app. When I boot Linux, I can run the EXACT SAME web application.

    Granted, I could probably do the same with some other environmnets (which I choose not to mess with).

    Keep in mind this is a family web site accessed mainly by family member. (Christmas lists, little league info, etc. etc.).

  35. What about for admins? by steveg · · Score: 1

    I'd really like to see some docs (a book, notes on the web, etc.) for admins.

    I'm not a java developer, I don't want to be a Java developer, but I have users who do.

    All of the Tomcat docs I've seen are written from the developer perspective. I need to be able to set up and maintain a development environment for students where they can work, and that doesn't crash the tomcat server every time somebody makes a coding error. But I have no desire to learn Java, only enough Tomcat to keep it running.

    --
    Ignorance killed the cat. Curiosity was framed.
    1. Re:What about for admins? by Flooded77 · · Score: 1

      I've got Professional Apache Tomcat from Wrox and it has helped me out a lot. Like you, I have no desire to develop on Tomcat, but I need to be able to administer it. Among the topics covered are logging, jdbc connections, ajp, security realms, application deployment and ssl.

      I believe this book (which covers 4.x - there is also a book covering 5.x) is still available on Amazon.

  36. Sample Chapters by kyoko21 · · Score: 3, Informative

    You can read some sample chapters here. Just use your favorite archiving application and acrobat reader(neither included).

  37. Re:Oh, Java by Brandybuck · · Score: 1

    Even if you're doing Java, not all Java is going to be web-server-side Java. It really annoys me all these people who think that their little corner of the development world represents the totality of existance.

    --
    Don't blame me, I didn't vote for either of them!
  38. Strongly Disagree with Review: Not a Good Book! by SarahAnnAlien · · Score: 5, Informative

    My boss came into my office a few minutes ago, saw this book on my desk, and asked if I had seen the review on Slashdot. I laughed a bit and said I had. I read this book many months ago, and told my boss about it.

    "How Tomcat Works" is a potentially good idea, done badly.

    The writing is awful. Not just inelegant, but frequently so bad that it gets in the way of the ideas being presented. Spelling, typos, grammar problems, convoluted sentences, miswordings that invert the meaning of a sentence entirely: this book has all that, and more. A fourth grade teacher with a red pen would have made this a much better book.

    A book on "Tomcat Internals" is a wonderful idea; Tomcat's a somewhat complicated beast. But the approach that this book takes... it just didn't work for me. It's possible that I simply couldn't get past the bad writing. Or it may simply be that it doesn't meet my needs. I'm familiar enough with Tomcat that I don't need it explained in tiny little baby steps. What I do need, when I'm up to my ankles in Tomcat internals and trying to solve a particular problem and get on with my life, is a clean, well organized book that will quickly get me oriented, refresh my memory on the relevant bits of Tomcat's architecture, and point me to the solution to my problem. This book fails to do that.

    The production values in this book leave a lot to be desired. There aren't enough diagrams, and, at least in my edition, the few that do appear are printed at very low resolution. The index is a joke. (Hint for the authors: a quick indexing script doesn't always make a useful index, okay? Second hint: hyphens denoting sequential pages are cool.)

    I've learned a lot about Tomcat since reading this book... mostly by wading through the source code. After a quick initial read-through, "How Tomcat Works" has stayed on my bookshelf, untouched, for at least five or six months. This book will join "Apache Server Commentary" in the pile of books that seemed like a really good idea, but in the end, were much less helpful than I had hoped.

    If you just need a book on installing or using Tomcat, or writing Java servlets in general, there are many better books. If you need a book on Tomcat internals, you probably need a better book than this one.

  39. Is it just me-Seaside. by Anonymous Coward · · Score: 0

    "This doesn't necessarily knock down existing frameworks like Ruby on Rails, which looks pretty sweet, or anything with frameworks."

    http://www.beta4.com/seaside2/

  40. Re:Is it just me by Ambient_Developer · · Score: 1

    Yeah, java is more than a applet dude, well at least since 1995. You can build full blown java applications, that work and in some cases even look like windows applications. Not only that you can also build server side applications. IBM is big into java, they have a highly popular editor named eclipse http://www.eclipse.org. Visit my sig, that is a java serverside application in essence!

  41. what as bad as writing them? by Dr.Knackerator · · Score: 1

    especially in an environment where the guy in charge of the jboss deployment couldn't make it run from an exploded WAR file. so every change meant a wait for the compile, zip up into a 1.5meg WAR file, copy it to deployment directory. Jboss then unexpands it and starts deployment.

    you then go through the whole login thing only to find out you screwed the configuration file.

    java/html/struts single handedly killed my love of coding within a year. coded since i was 11, now 33. hardly touch code now even for fun.

    php is much better adapted for the web. php 5 is getting 'closer' to java (integration as well as the language) so if i was to do anything that required a middleware layer now i'd do the front in PHP and use java for the middleware. and get somebody else to do that, screw EJBs :)

    1. Re:what as bad as writing them? by Anonymous Coward · · Score: 1, Insightful

      Hey man - this isn't a flame, but I have been on projects before where the developers also thought this was the way to develop J2EE. The thing is that you can actually set things up so that developing a lot of your code is just as quick as perl/php. The trick is to use something like Eclipse (particularly MyEclipseIDE.com) which enables hot code deployment. In other words, you edit a file, click save, it is built immediately and deployed .. in my case always before I can hit 'reload' on the browser. Overall, for the stuff I spend most a lot of time doing (Implementing business logic within one method) this is a hell of a benefit. For the other things, including refactoring or adding new methods .. you might still need to restart but I think this is being rectified soon ...
      Oh yeah, to anyone reading this - any knowledgable developer does not code in Java because of it's syntax, it's goodies (as if it really has any) or any of that shit. Most people use Java for the same subleties you might use Linux over another OS - it has more community, it makes more moves in cool ways than other technologies, has a HUGE amount of things written directly for it, it has been widely supported in a fashionable and productive way, to name a few. I will actually freely flame the guys that use what is honestly _not_ an application language (perl or similar) for application tasks. There is a reason that no case tools support perl, that there are no proper web application architecture documents written for it and in particular no extensions written for it that are even in the same category as JSTL/JSF/etc. I once went looking for a 'good' web MVC framework for perl/php/etc... only to find a single one that didn't even really compare to the 100s out there for Java. Finally, please get this straight - Apache is a great WEB server - not a great Application server. The preference to not seperate out the tiers is baffling, truly. Hell, I am thinking about making mod_mysql which will embed the mysql process inside the apache process too .. my goal is eventually to have my whole OS running inside one, compact and highly effecient (less context switching!) process - Apache.

      pHEAR.

      Sincerely,
      zed m.

    2. Re:what as bad as writing them? by Dr.Knackerator · · Score: 1

      yeah that wasnt working when i last coded that stuff ~ 2002

      java is still overkill for working with web pages though.

      oh and the run everything through apache - sounds a bit like early novell :)

  42. You can't change the TC settings with Blackboard by MichaelPenne · · Score: 1

    anyway, so they're (BB inc's) idiotic set up of Tomcat, your stuck with it. A better idea is to get them to switch to Moodle, it's every bit as good as BB, faster, and runs on straight LMAP, no need for stinky ol'Tomcat (nor MS SQL & IIS, ak-pffft!).

  43. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  44. Re:Is it just me by Anonymous Coward · · Score: 0

    Flow control!? Finally a language with flow control! It's about time...

  45. Re:Is it just me by Anonymous Coward · · Score: 0

    Nup. I feel like Java bashing. It started off as a slow incapable not quite free software solution that doesn't quite work on all platforms (write once, test and tweak everyfuckingwhere). It's developed into an over-engineered (Java2 Everyfuckingthing Edition) not quite free software solution that doesn't quite work on all platforms.

    I WANT to love Java. Honest I do. But its gone to shit.

  46. Re:You can't change the TC settings with Blackboar by Anonymous Coward · · Score: 0

    anyway, so they're (BB inc's) idiotic set up of Tomcat, your stuck with it.
    What are you trying to change that you haven't been able to? I've changed a few of BB's tomcat settings.

    no need for stinky ol'Tomcat (nor MS SQL & IIS, ak-pffft!)
    Don't need MSSQL or IIS for BB either.

  47. Re:I don't want to start a holy war by MaxwellStreet · · Score: 2, Informative

    Remember that JSP's are simple shorthand for objects that eventually get compiled into full-fledged servlets upon their use (or earlier, if you precompile them when deploying your app). The difference between JSP's & servlets is a development-time issue only.

    And there is no reason at all to mix business logic & content - in fact, application frameworks like Struts make it *hard* to do so.

    The rest - slowness, memory use, etc. - could apply to any commonly used platform. I've seen studies that put certain types of java code as faster than the "managed" code of the .NET framework. Unless you're coding your web pages in C, this "slowness" or "memory use" will be an issue, as anything else (.NET, perl, php, etc.) is all interpreted.

    Or perhaps IHBT. HAND.

  48. Integrating Tomcat5 with Apache2, for Windows by Anonymous Coward · · Score: 0

    One of the biggest problems so far has been finding good info on the process of integrating Tomcat/mod_jk with Apache under Win32.

    Good luck using any official Guides for the task.

    Check...
    http://www.devside.net/web/server/windows/Tomcat
    http://www.devside.net/web/server/windows/mod-jk

  49. Re:Is it just me by Anonymous Coward · · Score: 0

    >> I keep getting flamed by the moderators

    might have more to do with your user id than with your opinions.

  50. Re:Could the editors... by Eric+Giguere · · Score: 1

    Tomcat is many things:

    The key is understanding what a servlet is. A servlet is an instance of a Java class that is invoked in response to an HTTP request. In other words, it's custom Java code for handling and responding to HTTP request by web browsers and other clients. Think the Java equivalent of CGI applications. If you like Java, servlets (and the JSP technology that is built on top of them -- JSP pages compile into servlets) are a nice way to build dynamic websites.

    You can use Tomcat in standalone mode or by hooking it up to a web server like Apache -- it ships with a module for the latter that directs servlet requests from Apache to Tomcat and back.

    It's getting easier to find hosting services that offer servlet support, and they usually run Tomcat to do it. Personally, I use KGB Internet, but check the list of servlet ISPs for other alternatives.

    Eric
    who has a Java-powered website
  51. Re:Is it just me by Anonymous Coward · · Score: 0

    The stupid people don't release that Java has improved greatly since 1996

    The way I tell the stupid people from the smart ones, is to look at their spelling, and word usage. Since I am quite confident that you did not really mean to use the word "release" which means "to let go", but rather probably meant "realize", you are leaning to the stupid side. The really stupid people, manage to use the word properly in one place and not in another.

    The smart ones realize this and wouldn't bash it.

    I wonder, do you take the short bus to work?

    BTW, Java really does suck ass. Does a whole pile of stuff OK, and does nothing well. However, I RELEASE that it doesn't SUCK as much today as it did in 1996.

    I am done. I am confirmed smart by your yard stick, you are confirmed painfully stupid by mine, and I still get to mention that Java totally sucks.

    Just because something sucks less today than it did in 1996, doesn't mean it doesn't still suck to this day. There is a "Just ask your mom" joke in here that I will avoid.

  52. Tomcat is NOT a J2EE server by danwiz · · Score: 5, Informative

    It is useful for not only those using Tomcat or those working with servlets/JSP/J2EE ...

    As a J2EE programmer, I find the reviewer's statement to be a bit misleading.

    Tomcat is not a J2EE server. The J2EE specification deals with Web Components (Servlets, JSPs) and EJBs (various EJB types and related services). Tomcat only satisfies part of the the full J2EE specification by serving Servlets and JSPs. Therefore, Tomcat is only a Web Container.

    JBoss is an example of a J2EE compliant app server.

  53. I could be off base, but... by Anonymous Coward · · Score: 0

    I'll bet this is a troll. No specific details, could do a s/Tomcat/whatever/ and get the same review, the classic calling cards of a book review troll. You make the call...

    1. Re:I could be off base, but... by SarahAnnAlien · · Score: 1

      I'll bet this is a troll. No specific details, could do a s/Tomcat/whatever/ and get the same review, the classic calling cards of a book review troll. You make the call...

      Sorry, not a troll. Download part of the book and judge for yourself:

      You might like this book. I did not.

      With better prose and better production values, a second edition might be worth a second look.

    2. Re:I could be off base, but... by ces · · Score: 1

      How does this book compare to Tomcat: The Definitive Guide from O'Reilly?

      I tend to be pretty skeptical of technical books from anyone other than O'Reilly, Addison-Wesley, or Prentice-Hall.

      --
      Happy Fun Ball is for external use only.
  54. PHP NOT by WamBamBoozle · · Score: 1

    distributed, load balanced, objects -- it will load balance across a cluster as well as on SMP machines, which are very common in SUN installations. A servlet must be serializable so that at any point the container can externalize it and resume it on another node.

  55. Re:I don't want to start a holy war by hey! · · Score: 1

    Well, it's OK to do presentation stuff -- taking stuff you've done out of the session and request and generating output for the user. Granted, there are dangers involved -- sooner or later somebody will make a huge jsp with tons of business logic. Granted, there are ways of doing presentation that aren't as dangerous. But it's simple and good enough for a lot of tasks, especialy combined with css.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  56. How about some more? by Anonymous Coward · · Score: 0

    Like strong Java OOD/OOP*. Like JDBC for database access that beats all other database abstraction layers I have seen. What about a lot of mature libraries and frameworks that make MVC2** application much easier. Ability to reuse your code in dekstop applications. And many more.

    * Object Oriented Design/Programming
    ** Model-View-Controller 2 app architecture

    --Coder

  57. java IS FAST by Anonymous Coward · · Score: 0

    on server side. I code web-apps for a living in java, and it beats anything maybe except apache plugins coded in C in performance. The myth that java is slow comes from poorly coded desktop GUI apps using Swing toolkit. That doesn't mean language itself is slow. On server side, where there's no GUI, it's screaming fast. Oh, and who cares about startup, you only need to start your server once. And now that IBM has made a decent GUI toolkit for java (SWT), it is becoming a decent language to write desktop apps too. Check out Azureus bittorrent client. I don't think you will complain it is slow. I had SWT plain text editor start up faster than gedit.

    --Coder

  58. We'll be using it by mr_zorg · · Score: 1

    I just completed an evaluation of the leading servlet engines for my employer, including the fabled Resin, and Tomcat 5 came out ahead in nearly every respect. It even had a 16% - 20% performance boost over Resin. We couldn't believe it ourselves... If you weren't considering Tomcat because of outdated opinions, it's time to take a second look.

  59. Tomcat versus others by achacha · · Score: 1

    By comparisson Tomcat is one of the best and quickest servers to run J2EE, servlets and JSP (it is also the best static content server around, Apache you know).

    I have used many other java application servers and they don't really come close. WebLogic dev environment and stability made me appreciate a root canal. WebSphere taught me patience while waiting for the debugger to start (if it doesn't crash while starting); not to mention the debugger can easily use up 1GB of ram while running. iPlanet, well I won't even go into that, I'd rather forget those 6 months I had to write code for it and it's bastard brother Kiva.

    Tomcat is relatively lightweight, you can use Eclipse to develop and deploy to it. But most important, the code executed on it is as good as the writer of the code and too often people writing apps for Tomcat should have just stuck with thier non-CS background and found an appropriate job :|

    On a side note, J2EE is a big hype, it's slow, cumbersome and overly complicated. You can do almost enything you want with a servlet or JSP page (and people should always try to keep as much of the content static as possible to take advantage of caches and reduce pointless execution cycles). Marshalling code in many implementations adds too much overhead to justify any benefits you may get from distribution, but your mileage may vary.

    Tomcat is free, people can just download it (http://www.apache.org) and try it out, the online docs and FAQs are pretty good, then once you have it running and you like it, buy some good books on it.

  60. Re:Is it just me by matteo_v · · Score: 1

    Dear Billy Troll,

    it's not languages that are insecure; no matter what language you use, you need to have competent programmers.

    Php is safe and robust, simple and elegant. You can build small or big applications. It is technically *simple*, and that means you don't need books like the one we're discussing here. Just learn the language and you're all set.

    Now take an incompetent programmer, and they will build you an insecure system, no matter what language you use.

    --
    -- http://matteo.vaccari.name/
  61. nice book !! by sandeep_babel · · Score: 1

    recommended for all web developers out there

  62. Re:Is it just me by Anonymous Coward · · Score: 0

    [PHP doesn't offer] the ability to respond to a HEAD or PUT request, not just POST and GET

    Well, that it does offer. Dealing with a HEAD request: buffer the generated contents, and only send the headers. A PUT request? No problem.

    Just beacause you don't know how to do it, doesn't mean it can't be done. (No offence.)

    -- Arien
  63. Struts Alternative? by archangel77 · · Score: 1

    I was under the same impression when I had a look at struts.
    I also tried a project with a struts-like PHP framework and it was awkward. Can you recommend any alternatives to struts?

  64. It is true, but why not? by tod_miller · · Score: 1

    it scares me that I DO judge a book by its cover, but I do. all of us do.

    For instance, I judge cereals by the cover, a whole new box. Now bearing in mind a box of cereals fills that quasi-intimate moment where I am still half awake, and I lovingly spoon it into my mou... oh, sorry.

    You see, books have to be appealing to us, technical books have to say, read my witty and easy going words, and you will be amused and infused!

    In a semi-related issue. In the new world of e-publishing, we see the internet is 99% utterly useless.

    Now real-world publishing on demand is sparking a torrent of even worse writing that is, shockingly, taking itself seriously.

    I am quite happy the way many OS developers have written authorative books on thier works, but in the future some enterprising scum might cloud the market place with bound copies of man pages and other scamful publishing.

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
  65. better experience with Jetty by brlewis · · Score: 1

    I had similar experiences with Tomcat. However, Jetty has worked great for me.

  66. Use the jk and not the jk2 connector by TheConfusedOne · · Score: 1

    Last time I got IIS and Tomcat talking was after I abandoned the jk2 and went back to the jk connector.

    There are some additional steps including permission setting to get IIS to use the redirector.

    More info here: http://www.rit.edu/~ack5504/tomcat-iis6-howto/tomc at_iis6_resources.html

    --
    --- I wish I could hear the soundtrack to my life. That way I'd know when to duck.
  67. petri is a girl by Anonymous Coward · · Score: 0

    one idiots opinion

  68. Re:I don't want to start a holy war by wbhauck · · Score: 1

    Slowness is an issue with any type of "interpreted page" (Perl/CGI, PHP, SSI). You get that with CGI in general--needs to fork and execute external script or program). mod_perl, though, imbeds Perl into the Apache. If properly loaded on startup, you really don't have any interpretation overhead--same with precompiling jsps. One issue, though, that Java truly has is memory usage. When it comes to RAM, Java is a pig. I'm starting to write basic jsps and servlets (go Struts!). My simple, one-application instance of Tomcat is using 28M resident memory. Apache with mod_perl and a few small apps is only using 5M. After hitting the app in Tomcat mem usage goes up to 34M, while Apache's mem usage only goes up to 7M. On another machine I have two sites with a total of 40 jsp pages. Tomcat mem usage there is at 44M. Apache on the same box is only 5M. While Java is neat and does give you many features, it requires an order of magnitude more hardware to support it (cpu, ram, fast disk.) Perhaps if Tomcat was written in C it would be more resource-friendly. Seriously. (No, it's not a troll. ;-) Good luck

  69. Re:Is it just me by 1110110001 · · Score: 1

    You already got the answer to question 2.

    ad 3) I know it's hard to unterstand if you're thinking differently, but PHP is strongly typed. It's so strong it's changed by PHP itself to match the value.
    And the other think is we're using HTTP. PHP is written for Webapps. That's why it sees everything like HTTP or HTML: as string. Thus it doesn't matter if a number is in an int or a string. The only think that matters for your validation is that it only has digits in it (like with is_numeric()).

    ad 4) You mean ... like cron jobs?

    ad 1) Yeah that's still a thing worked on. SRM might really be a solution to it.

    See PHP is not standing still, but your arguments are. I don't see you working with PHP often enough to be able to argue.

    b4n

  70. Re:Is it just me by temojen · · Score: 1
    ad 3) I know it's hard to unterstand if you're thinking differently, but PHP is strongly typed. It's so strong it's changed by PHP itself to match the value. And the other think is we're using HTTP. PHP is written for Webapps. That's why it sees everything like HTTP or HTML: as string. Thus it doesn't matter if a number is in an int or a string. The only think that matters for your validation is that it only has digits in it (like with is_numeric()).

    You have just described a weakly typed language.

    ad 4) You mean ... like cron jobs?

    No. Cron jobs are not running continuously (or whenever there's an event that needs handling), and are not in the same process space as your application.

    I don't see you working with PHP often enough to be able to argue.

    You must not be looking. I use PHP most days.

  71. Re:Is it just me by 1110110001 · · Score: 1

    Ok I'm not going to argue about calling it strong or weak. There're different meanings ... However in the end it doesn't matter in the field of webapplications.

    But both, a continuosuly running script and exchaning data with the other scripts (or just have some data saved between the scripts) is very easy with stuff like shared memory.

    I don't see PHP being worse or better as Tomcat or other Java stuff. It just works different, but without problems.

    b4n

  72. Re:Is it just me by temojen · · Score: 1
    I don't see PHP being worse or better as Tomcat or other Java stuff. It just works different, but without problems.

    That's not the question. The question was:

    what does Tomcat offer me that PHP does not, other than needless bloat and heavy system requirements?

    Which is what I (and others) answered. It called for no value judgement.

  73. Re:You can get the book here by Anonymous Coward · · Score: 0

    Nice try, asshole.

  74. Re:Is it just me by JavaRob · · Score: 1

    it's not languages that are insecure; no matter what language you use, you need to have competent programmers.

    Well, you're right that you *do* need competent programmers to build a secure system, no matter what language you are using. You're wrong on your first point, though. PHP and Java both run in interpreters -- that's software which *itself* can have exploitable flaws.

    Language design also does make a difference in security. Even if all interpreters and runtimes were perfectly secure (they're not, and PHP in particular still has a lot of maturing to do), you still have a level of "gotchas" that a programmer must know to avoid for their site to be secure.

    Java *and* PHP, for example, are designed so that buffer overflows are impossible. All of the buffer overflow exploits that keep showing up in even well-designed software like Apache... those are a hugely dangerous gotcha because the level of careful, intelligent programming required to avoid them is very high for complex software.

    Alas, PHP has features designed to make programming quick and easy that also introduce lots of gotchas, like the loose-typing. You can take random input from the user, like $username = $_POST['username'], and execute that *inputted text* like a function if you screw up and put extra parentheses after it:
    $other_var = $username();

    You make that mistake, and an external user can call any function they want, just by tinkering with the username field. They are gotchas in any language, but the ones in Java are more likely to break your code logic, NOT to give lots of power where you didn't mean it (thanks to the integrated security model and strict typing). I've only been learning PHP for about a week now, and I've already noticed a bunch... so I don't really know the full extent, but of course a more "flexible" language will have more of them.

  75. Re:Is it just me by matteo_v · · Score: 1
    Alas, PHP has features designed to make programming quick and easy that also introduce lots of gotchas, like the loose-typing. You can take random input from the user, like $username = $_POST['username'], and execute that *inputted text* like a function if you screw up and put extra parentheses after it: $other_var = $username();
    How likely it is that the program works at all if I make that error? Dangerous errors are things that generally work as intended, but have exploitable flaws. Handling user input well is critical for security; here is where programmer competence is needed, no matter what programming language you use.
    --
    -- http://matteo.vaccari.name/
  76. Re:Is it just me by JavaRob · · Score: 1

    That's a good point, though I've seen enough bad code to say that errors like this actually COULD make it out -- there's a shocking number of developers out there who just make changes until it "works"... even if they're still broken code being executed (in PHP you just put an "@" in front of any function call to suppress errors, and people DO this so they can keep working without sorting out the problem!). You see multiple attempts to do the same thing, and only ONE of them actually does it. Ugh.

    That's back to incompetent programmers, though..

    Here's a better review of security issues in PHP, with much better examples than I had. I'm out of my areas of expertise....