Slashdot Mirror


Apache Tomcat 4.0 Final Released

A reader writes "The latest version of the Apache Java Servlet engine has been released. 'The 4.0 release implements the Servlet 2.3 and JSP 1.2 specifications.' Read more at The Apache Group's Jakarta site."

288 comments

  1. Code Red by Anonymous Coward · · Score: 0, Funny

    Maybe they can finally get code red to work in this version.

  2. Tomcat looks good by claes · · Score: 5, Informative

    Tomcat is getting pretty good. Version 4 makes it very easy to deploy new webapps: it includes a web admin interface, and new apps can be deployed without restarting it. As a standalone webserver it is also fairly competent, at least for specialised applications with smaller user numbers.

    Apache does some great things with Java. I have worked both with Tomcat (servlet container), Xerces (XML parser) and Xalan (XSLT engine). Thanks to the good work to come out from Apache, Java has become a very strong competitor to MS .NET. Actually I think it is ahead. In the future we will get the XML Binding API, that makes it possible to compile XML Schemas to java "xml manipulator" classes that can be used to manipulate XML instances of these schemas. XML parsing and manipulation will then be childs play. Define your schema, compile it and you have code that is specialised to work with these documents!

    With a strong XML foundation in place, Java's future is looking really good.

    1. Re:Tomcat looks good by Anonymous Coward · · Score: 0
      Do you think you could fit one more "XML" in your next post?

      I don't think you emphasised it enough.

    2. Re:Tomcat looks good by Kingpin · · Score: 1

      Java has become a competitor to .NET? .NET is not even reality yet.
      Java has strong infrastructural strengths already (and have had so since day 1).

      OTOH, once .NET gets going we'll have the best of breed virus platform
      that supports any MS programming language (and more!) of your choice :)

      --
      Unable to read configuration file '/bigassraid/htdig//conf/14229.conf'
      Geocrawler error message.
    3. Re:Tomcat looks good by sporty · · Score: 1

      XML. Sorry.. couldn't help it :)

      --

      -
      ping -f 255.255.255.255 # if only

    4. Re:Tomcat looks good by sharkey · · Score: 2, Funny

      OTOH, once .NET gets going we'll have the best of breed virus platform that supports any MS programming language (and more!) of your choice :)

      Yes, but will .NET be able to get Evolution on my RedHat 6.2 PC to run Outlook viruses properly? That is, immediately and with little to no intervention on my part?

      --

      --
      "Outlook not so good." That magic 8-ball knows everything! I'll ask about Exchange Server next.
    5. Re:Tomcat looks good by Wolfier · · Score: 3, Funny

      No doubt. In order to be the ultimate platform of corporate choice, .N3T will guarantee backwards compatibility with all Outlook, Windows, DOS and CP/M viruses.

      "We're doing this because our customers and the public ask for it. This way, our software can help them avoid hassles associated with incompatibilities among programs." An anonymous spokesbeing says.

    6. Re:Tomcat looks good by Anonymous Coward · · Score: 0

      Are Tomcat, Xerix and Xalan really enough to take on MS' .NET?

      I would think the priority would have to be on J2EE servers; .NET's an application server, not just a web page server, after all.

      And I have a funny feeling MS' tools are gonna be *really* nice, which might catch the opensource world vulnerable...

    7. Re:Tomcat looks good by _fuzz_ · · Score: 1
      Apache does some great things with Java. I have worked both with Tomcat (servlet container), Xerces (XML parser) and Xalan (XSLT engine). Thanks to the good work to come out from Apache, Java has become a very strong competitor to MS .NET.

      I think it should be noted that a lot of the things we see from the Apache project were donated by other players. Tomcat was the reference servlet runner that was donated by Sun. Xerces is the continuation of IBM's XML-J parser.

      So not only should we thank those involved in the Apache project, I think we also need to thank Sun and IBM for "seeing the light" of open source. Of course, they also stand to benefit the most from Java's success.

      --
      47% of all statistics are made up on the spot.
    8. Re:Tomcat looks good by KillerLoop · · Score: 1

      the tomcat 3.* branch was based on sun code. tomcat 4 (catalina) is a complete rewrite.

    9. Re:Tomcat looks good by lfourrier · · Score: 1

      depending of the definition, tomcat can be viewed as an application server. It clearly is not just a web page server.

    10. Re:Tomcat looks good by Kerg · · Score: 1
      Are Tomcat, Xerix and Xalan really enough to take on MS' .NET?

      Not by themselves. But with JBoss there is still hope.

    11. Re:Tomcat looks good by Tony-A · · Score: 1

      LOL.
      RedHat 8.2 will have enough compatability and Sandbox/Jail capabilities to not only run it, but to run it with impunity.

    12. Re:Tomcat looks good by _fuzz_ · · Score: 1
      the tomcat 3.* branch was based on sun code. tomcat 4 (catalina) is a complete rewrite.

      True, but the Catalina developers took things learned from the Tomcat 3 tree. I also see a few Sun and IBM engineers mentioned in the source tree. Basically, Tomcat wouldn't be where it is without Sun.

      --
      47% of all statistics are made up on the spot.
    13. Re:Tomcat looks good by bilsaysthis · · Score: 1

      But will JBoss run into the same licensing issues that Enhydra Enterprise did? Uh oh.

    14. Re:Tomcat looks good by Kerg · · Score: 1
      No.

      The issue with Lutris was they wanted their server to be certified. Also you should notice that it was Lutris decision alone to close the EE project. They're playing a blame game and pointing at Sun. I'm not buying it.

  3. very cool by Dalroth · · Score: 5, Informative

    I'm not completely up to speed on what Java Web development enhancements this brings to the table. However, I can honestly say that in my dealings with ßeta versions of Tomcat 4.0, the configuration files for Tomcat 4.0 are 1000x times easier and more sensible! The configuration files for Tomcat 3.x look like they were designed by a monkey on crack (or a Sendmail developer). Tomcat 4.0 config files are finally well thought out and usable. Can't wait to get my systems upgraded! :)

    1. Re:very cool by jslag · · Score: 1

      The configuration files for Tomcat 3.x look like they were designed by a monkey on crack (or a Sendmail developer)

      Come on, let's give the Tomcat programmers a little credit. 3.x config files are nowhere near as bad as sendmail.cf, they're just a little verbose.

    2. Re:very cool by sstidman · · Score: 1

      I'm with the first guy....I use Tomcat at home and found the configuration of Tomcat 3.x very difficult and non-intuitive. Granted, Sendmail is worse, but it takes many years of hard work and dedication to make configuration files as hard to work with as Sendmail. I can't wait to get my hands on Tomcat 4.0.

      --
      Send/track messages to 100K people: www.xPressAlert.com
  4. Aieee! My eyes! by kvigor · · Score: 0, Offtopic

    I'm color-blind, and this scheme still hurts.

    I think my retinas are bleeding now.

  5. Re: Apache by Spanishlnquisition · · Score: 0, Troll

    NOBODY expects the Spanish Inquisition!

    --

    --
    This sig intentionally left blank
  6. Woah! by green+pizza · · Score: 1

    I'm only using version 1.3.18 right now, so this will be quite a huge upgrade for me! Quite cool, I'll be downloading and compiling the new version tonight!

    1. Re:Woah! by manic+micko · · Score: 1

      You're thinking Apache HTTPd --- this is Apache Tomcat, a Java Servlet container and JSP engine. Get with the program! ;)

      Still, please try it out. Tomcat rocks! Many thanks to Craig, Remy, and the other developers who made Catalina a reality.

      Mike

  7. good for linux by Anonymous Coward · · Score: 0

    I hope the communicuty relizes what a big deal this is for linux, and will promote it accordinly. Lots of people are looking for ASP, Cold fusion, and Perl alternatives as their applications scale beyond what scripting languages are capable of. Once a project reaches a certain level the very nature of dynamic scripting languages becomes a burden. Anyways the real point is that this will finally make companies realize that they can run their very important intranet/database applications using linux and without wasting lots of money on stupid middleware.

  8. Good places to start? by newbiescum · · Score: 1

    Anyone know a good place to start learning about Java Servlets and, in particular, how to implement such programs with Tomcat? The last time I tried, it was a major hassle to get even the sample applets running, and I would like a fresh start.

    1. Re:Good places to start? by ThePreciousRoy · · Score: 0

      Applets and servlets are completely different... If you want to learn about applets which you embed in a web page (or pop up... or what ever) ...

      http://java.sun.com/applets/?frontpage-spotlight

      Applets suck. Web start is much cooler, if you dont want to embed stuff..

      http://java.sun.com/products/javawebstart/

      But if you want servlets... which process/send http requests/responses and run on the server...

      http://java.sun.com/products/servlet/

      DON'T use JSP... please... try a template engine...

      http://jakarta.apache.org/velocity/

      watch out for the licensing... Its been scarring me recently.. I wish I knew of a better language...

      http://www.sun.com/981208/scsl/principles.html

    2. Re:Good places to start? by CajunArson · · Score: 1

      Try the O'Reilly books on JSP and Java servlets (I much prefer servlets to JSP, but that is just my preference).

      Apart from all the updates that have been made to the architecture, the ability to update servlets without having to restart the server will be VERY nice.

      I also hope that the MySQL JDBC support is quickly updated to allow for the more powerful DB operations that the new specs support, that would have made my life easier last summer.

      --
      AntiFA: An abbreviation for Anti First Amendment.
    3. Re:Good places to start? by (H)elix1 · · Score: 1

      Try Wrox "Professional JSP 2nd Ed". It works from Tomcat as the basis for most example code. Nice intro into JSP, which does hit servlets as well...

    4. Re:Good places to start? by Anonymous Coward · · Score: 0

      The ORielly books are great - got me up an running in no time.

    5. Re:Good places to start? by Rich+Katz · · Score: 1

      Try Java Skyline: Learn JSP and Learn Servlets:

      http://www.javaskyline.com/learnjsp.html
      http://www.javaskyline.com/learnservlets.html

      These pages are both tutorials and guides to Web learning resources on JSP and Servlets.

      Regards,

      Rich Katz

    6. Re:Good places to start? by Anonymous Coward · · Score: 0

      DON'T use JSP... please... try a template engine...

      And the advantage of this?
      Unless something has seriously changed with the new servlet and jsp api's then they both have their places.

      Three words: Model - View - Control

    7. Re:Good places to start? by flacco · · Score: 1
      Anyone know a good place to start learning about Java Servlets and, in particular, how to implement such programs with Tomcat? The last time I tried, it was a major hassle to get even the sample applets running, and I would like a fresh start.

      The O'Reilly book (2nd ed) is a good start.

      As for getting Tomcat up and running, stick with it - takes a little time to find all the loose ends - some better docs from Apache would be nice, but hey, they've done enough :-)

      --
      pr0n - keeping monitor glass spotless since 1981.
    8. Re:Good places to start? by TheInternet · · Score: 1

      Three words: Model - View - Control

      Which is the concept Velocity is built around, correct?

      - Scott

      --
      Scott Stevenson
      Tree House Ideas
    9. Re:Good places to start? by iapetus · · Score: 2

      Where better to start than Sun's own tutorial?

      --
      ++ Say to Elrond "Hello.".
      Elrond says "No.". Elrond gives you some lunch.
    10. Re:Good places to start? by ThePreciousRoy · · Score: 0

      JSP encourages breaking of MVC... anything that allows you to instantiate objects in the view is "bad"...

    11. Re:Good places to start? by Anonymous Coward · · Score: 0

      James Goodwill - Author of Developing Java Servlets, is in the process of finishing a Tomcat book due out in November. It is based on release 4.0 of Tomcat.

    12. Re:Good places to start? by Anonymous Coward · · Score: 0

      A good starting point is
      Installing Tomcat on Linux:
      http://www.linuxgazette.com/issue69/peda.html

      For a generic JSP tutorial look at:
      www.jsptut.com

  9. WOW - 6 hours by icoloma · · Score: 2, Informative

    Tomcat 4 was waiting for the new servlet standrd from Sun to become from draft to final.

    THAT WAS TODAY. Less than six hours later (I don't know the exact amount of time) Tomcat was announcing the official release of Tomcat 4. That is going fast! :)

    1. Re:WOW - 6 hours by MSBob · · Score: 2

      Yeah, Tomcat guys were saying on the mailing list that they would call the last beta a "beta" until Sun puts a seal on the spec because they were ready much earlier (pending any changes in the spec that is). So basically as soon as they found out about the spec approval they just branched the code and made the build. It's all in their mailing list.

      --
      Your pizza just the way you ought to have it.
  10. And that also means... by vanza · · Score: 2, Informative

    That the 2.3 Servlet specification and 1.2 JSP Specification have been released as final.

    --
    Marcelo Vanzin
  11. Hehe by JediTrainer · · Score: 3, Insightful

    Anybody else appreciate the irony that 4.0 Final is released while 3.3 is still in beta?

    I've been using Tomcat 3.2 in production for the last 6 months or so and it's been a wonderful servlet container. I can't wait to try out 4 in our testing environment!

    --

    You can accomplish anything you set your mind to. The impossible just takes a little longer.
    1. Re:Hehe by Dg93 · · Score: 3, Informative

      The 3.x and 4.x trees are completely different codebases... My understanding is that the 3.x tree will continue to get a certain amount of maintenance and development while the 4.x tree gets shaken out.

      4.x has been in beta for a while, they've mainly been waiting for Sun to finalize the specs.

      --
      --Dg
    2. Re:Hehe by JediTrainer · · Score: 3, Informative

      The 3.x and 4.x trees are completely different codebases... My understanding is that the 3.x tree will continue to get a certain amount of maintenance
      and development while the 4.x tree gets shaken out.


      I know. Actually, 3.x was based on the Sun Java Server, whose source code was donated.

      The irony is that it's taking longer for the 3.x line to get fixed properly than it is for the developers to have worked from scratch on a rewrite of the whole thing. There are quite a few things wrong with 3.2 which I won't get into (yes, we DO use it in production). I know that these things have been addressed in 4.0, while 3.3 is still working on it.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
    3. Re:Hehe by Anonymous Coward · · Score: 0

      It's because there's a "Clash of the Egos"; the guys in charge of the 3.x series don't want to stop working on their baby even though it's deprecated.

  12. Very Mini howto... by (H)elix1 · · Score: 5, Informative
    Download the file - lets say on a Win2K they have locked down at work. No admin rights? no problem... (Win2K assumptions here, though most OS's work about the same)

    Make sure you have a JDK installed, like Sun's Windows version.

    Unzip to a directory - taking the defaults sets you up in c:\jakarta-tomcat-4.0.

    Go to the control pannel, click system, click advanced, click Environment Variables. Click new button on system variables and create a JAVA_HOME with a path to where you extracted your JDK. (My box has javac located in c:\jdk\bin, so my JAVA_HOME is c:\jdk). Create a TOMCAT_HOME as above pointing to c:\jakarta-tomcat-4.0.

    Open up a command prompt, cd to c:\jakarta-tomcat-4.0\bin and run startup.bat.

    Open a browser and type in http://localhost:8080, you should see it...

    Happy hacking in the example code!

    1. Re:Very Mini howto... by jeffy124 · · Score: 1

      most OS's work about the same
      ...
      Unzip to a directory - taking the defaults sets you up in c:\jakarta-tomcat-4.0.


      Call me crazy, but I dont think my linux box will like that too much :)

      --
      The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
    2. Re:Very Mini howto... by Yokaze · · Score: 1

      Don't know about your configuration, but mine has no problem with it. (Reminds me at some Opera Beta Version)

      Just "cd c:\\jakarta", but about that startup.bat, how am I supposed to run that thing :) ?

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
    3. Re:Very Mini howto... by hansk · · Score: 3, Informative

      Create a TOMCAT_HOME as above pointing to c:\jakarta-tomcat-4.0

      This should actually be CATALINA_HOME. The TOMCAT_HOME var was in the older versions.

      The RUNNING.txt file included in the distributions contains the installation steps and, yes, they are very simple.

    4. Re:Very Mini howto... by (H)elix1 · · Score: 1

      I'm running without a CATALINA_HOME, and it spins up fine - jsp, servlets, and JavaBeans... The howto was just to get folks up and running with a stand alone version, without the clutter of extra stuff.

      Without reading the docs (grin), I think that had more to do with setting up just the servlets. Could be wrong, won't be the last time...

    5. Re:Very Mini howto... by Anonymous Coward · · Score: 0

      with the supplied startup.sh

  13. Load balancing? by MSBob · · Score: 2
    I haven't looked at it yet but my first question is:

    Does Tomcat4.0 support load balancing the way 3.2.x did?

    In 3.3.x you could load balance a cluster of Tomcats through apache and mod_jserv or mod_jk (which is what we use). So does T4.0 support load balancing and if so is it through mod_jk or is there a new module to do the job? If so has anyone played with it yet?

    --
    Your pizza just the way you ought to have it.
  14. Hopefully it intalls easier... by Teancom · · Score: 3, Informative

    I wasted a week of my life trying to get tomcat 3.2.x up and going on a solaris machine. The documentation was the worst that I had *ever* run across, with "how-tos" sporadically jumping back and forth between version 3.1 and 3.3, with not one single "clear, concise, consistent" document available for 3.2 (the previously current stable version). Even step involved downloading another package from the jakarta project, trying to figure out *it's* documentation, installing it, testing, and then finally getting back to tomcat just to discover (generally buried in some obscure comment four pages into a mostly-irrelevant faq) that you need to go get something else.

    Frankly, it wasn't until I got it going on a debian/x86 machine (apt-get install tomcat) that I was able to trace my way back and install it on solaris. Not that apache itself was much better, trying to get apxs working.

    Then, after it was going, I tried to enable .jsp support in all my user's home directories, the same way we do with cgi's (this is intranet, and we have a lot of people running things out of their ~username). Can't be done. Absa-no-freaking way. Either you configure each directory individually, basically "giving" the /public_html/ dir to tomcat and bypassing apache completely, or you make everybody create a new directory and then configure them *individually*. If someone has a work around for this, I would *love* to hear it. Note the main problem is that tomcat doesn't understand the ~ syntax, so the url passed by apache when a .jsp page is requested is "foo.com/~user/baz.jsp", and then tomcat complains that ~user/baz.jsp doesn't exist. This is the #1 reason jsp/servlets aren't used more where I work.

    So, I am *eager* to try out this release, and I truly hope that my complaints are now foundless. I would love nothing better than to be proven wrong, that the documentation has been completely overhauled, that it now understands the common ~username, that it works with any jdk besides blackdown's (on linux), and that it basically doesn't suck. But I'm not holding my breath.

    1. Re:Hopefully it intalls easier... by MSBob · · Score: 2

      I hear you loud and clear. But if you think you've seen the worst in terms of installation woes you should check out IBM Websphere. Oh, man two months since 4.0 shipped and I still haven't got it all running. What a f***ing nightmare!

      --
      Your pizza just the way you ought to have it.
    2. Re:Hopefully it intalls easier... by crisco · · Score: 2
      Thats OK, I fought with tomcat in Debian unstable, it installed but wouldn't do it's magic with servlets and jsp like it was supposed to. I finally gave up and grabbed the tomcat 4 beta binary from Apache's site and everything worked properly. I might have another go round once this makes it into sid.

      Maybe you could write a script that did the configs for you?

      --

      Bleh!

    3. Re:Hopefully it intalls easier... by Furry+Ice · · Score: 1
      I've never actually had *any* problems getting Tomcat installed. Perhaps it's just that I'm a Java developer and have most of the requisite libraries already installed? I don't know. Either way, I definitely agree with you on the ~username issue. Since I'm not a Tomcat developer I can't say I know with certainty why that hasn't been implemented, but I'll bet it has a whole lot to do with portability. It's Java's wonderful super-duper feature that just never really works out right. As far as I know, there is no way to get an arbitrary user's home directory in Java. The home of the user that's running the java process is available in the system propery "user.home" but that's the only one you can have access to without using native calls, which Tomcat has avoided completely, I believe. I guess you could also parse /etc/passwd directly, but again, it impedes portability.

      I'd rather sacrifice portability for usability, but that's not the dominant ethos among most Java coders.

    4. Re:Hopefully it intalls easier... by Anonymous Coward · · Score: 0

      I'm actually quite shocked to hear that people have had such a difficult time getting Tomcat up and running. (What's more, I'm even more shocked that someone had any difficulty with Apache or apxs - but that's an altogether different topic.) I've installed all different versions of Tomcat on many different platforms and never once have I ever experienced these types of troubles. Can people tell me what kind of difficulties specifically they've had? I never found any of these glaring troubles. Howver, maybe I take the whole process for granted since I'm a Java developer. Please help me understand what difficulties plagued people the most.

    5. Re:Hopefully it intalls easier... by bteeter · · Score: 1

      Amen. Jakarta is a walk in the park compared to installing Websphere. Even IBM's own consultants couldn't get Websphere 3.0.2 to install and run on Solaris...

      Take care,

      Brian
      100% Linux Web Hosting, No Windows, No Viruses, No Worms...

    6. Re:Hopefully it intalls easier... by Anonymous Coward · · Score: 0

      ant is a bitch to configure properly...too many paths for tomcat and ant. compiling tomcat was a real bitch. redirection in tomcat is another bitch. ever tried chaining servlets ? its an ungodly pain. what about stupid stuff like http://mycompany.com/~user1/myservlet.jsp i.e. jsp execution for all paths recursively under a tree...etc etc

    7. Re:Hopefully it intalls easier... by Anonymous Coward · · Score: 0

      I spent more than one week trying to integrate Tomcat with IIS on a Windows platform, so that Tomcat would server JSP pages and servlets, and IIS would take care of the rest. The documentation was simply awful, and at the end, I wasn't able to accomplish it all. We ended up using WebSphere from IBM.

    8. Re:Hopefully it intalls easier... by Suhas · · Score: 0

      Ever tried iPlanet..I will explain the problems once my head heals from banging against the monitor....

    9. Re:Hopefully it intalls easier... by MSBob · · Score: 2

      Yuck! I'm supposed to start evaluating it next week! Ouch!

      --
      Your pizza just the way you ought to have it.
    10. Re:Hopefully it intalls easier... by GreggBert · · Score: 1

      Actually, we found very few problems installing WebSphere under Solaris 2.6 (SPARC). Now, under Windows NT Server 4.0...that's a whole different story. We tried to install WAS 3.5 on several NT boxen over the course of a year's time and only got it to marginally work. Then we applied the 3.5 service pack # 2 and trashed the complete install. Very frustrating but not as frustrating as dealing with IBM's WAS tech support. And we paid for this stuff ???

      --


      If you don't understand anything I post, please accept that I ate paste as a small boy...
  15. J2EE-ish support? (for java CA) by coyote-san · · Score: 3, Interesting

    I'm currently working on a certificate authority written with servlets (and JNI calls to libopenssl for the gory work of actually creating and signing the X.509 certs), and everything is using EJB beans. The goal is to have the CA entity beans handle the actual CA and X.509 tasks, another set of beans and JSP to handle the web and java client interfaces, and yet another set of beans to handle the business rules regarding content and issuance of the certs, and tying it all together with J2EE or something similar.

    The only problem is that I seem to be missing a piece of the puzzle. For now, I'm creating and initializing the beans explicitly, but shouldn't this be handled automatically somewhere/somehow? I'm sure I'm just missing some small piece of information in this huge pile. Does this release address this problem, or is it an entirely different set of code?

    (As a related aside, I'm gonna stop using Debian if it continues to have such long release cycles. I eventually got suitable openssl (0.9.6), postgres (7.0) and java (1.3) installed, but it took days and a lot of pain because of the length of the "to do A you must first do B, to do B you must first do C, to do... chain.)

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    1. Re:J2EE-ish support? (for java CA) by thelexx · · Score: 2, Informative

      From what I've read on the Tomcat-user list, Tomcat does not do EJB and JBoss is the usual recommendation.

      LEXX

      --
      "Gold still represents the ultimate form of payment in the world." - Alan Greenspan, 1999
    2. Re:J2EE-ish support? (for java CA) by big_hairy_mama · · Score: 1

      Use debian unstable, which I've been using at work and at home with hardly any problems. It's really not unstable at all. With that, the release cycle is every six hours or so :)

    3. Re:J2EE-ish support? (for java CA) by coyote-san · · Score: 2

      I usually update when they go into a release freeze, but 'unstable' really is too unstable for me to use. I've been burned in the past, and my spare systems (P-166) are too limited to do some of the necessary work.

      To be fair (since many non-developers read this list), this release cycle has been particularly nasty because some key Debian tools now depend on Perl 5.5, and that forces you to fully convert to 'unstable' instead of installing a handful of selected packages. (Some maintainers archived the last pre-5.5 version in 'pool', but many did not.) But by that same measure the release manager should have identified introduction of Perl 5.5 and the tools as the trigger for the next release since it's a *huge* roadblock to this type of "stable + one or two updated packages" approach that many of us prefer.

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    4. Re:J2EE-ish support? (for java CA) by Victor+Ng · · Score: 1

      If you need just a couple of new packages, you might want to build your own dpkg's from source + the diff file.

    5. Re:J2EE-ish support? (for java CA) by mmcshane · · Score: 2, Informative

      Tomcat is a servlet container, not an EJB container. As such, it can only run servlets, jsp's (which really are just special cases of servlets), and javabeans. You need an EJB container to run EJB's. The most popular open-source EJB container is JBoss (it also integrates very well with Tomcat).

      Your are correct in saying that you never instantiate an EJB directly, you ask the container for a reference to an EJB and the container can instantiate a new EJB for you or reuse an old one or pull one out of a pre-existing pool.

      BTW, you may want to look into using JAAS (Java Authentication and Authorization Services) which was released today as a component of J2EE 1.3 for some of your security needs.

    6. Re:J2EE-ish support? (for java CA) by nconway · · Score: 1
      As a related aside, I'm gonna stop using Debian if it continues to have such long release cycles. I eventually got suitable openssl (0.9.6), postgres (7.0) and java (1.3) installed, but it took days and a lot of pain because of the length of the "to do A you must first do B, to do B you must first do C, to do... chain.


      Run Debian unstable -- my unstable boxes have Linux 2.4.9ac10, XFree86 4.1.0+, Java 1.4b2, Postgres 7.1.3 (or 7.2-dev), OpenSSL 0.96b, etc. Plus, don't be afraid to compile and install stuff by hand -- for instance, I never used pre-packages versions of Apache because I'll be recompiling it frequently anyway.
    7. Re:J2EE-ish support? (for java CA) by coyote-san · · Score: 2

      When push comes to shove, I'll package it myself and install the package to /opt instead of /usr. Too bad that makes deblint complain, unless they fixed it. (Official Debian packages shouldn't install to /opt, but by the same measure my own unofficial packages shouldn't install to /usr.)

      --
      For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
    8. Re:J2EE-ish support? (for java CA) by nconway · · Score: 1

      Why not '/usr/local' ?

    9. Re:J2EE-ish support? (for java CA) by Ed+Avis · · Score: 1

      Debian needs a way to say 'install this package from unstable, plus all its dependencies, but nothing else'. Everything else on your system remains unchanged, so you don't have to move the whole machine to unstable just to get the latest version of Postgres or whatever. In fact I think it should pull the source packages from unstable, compile and install them (don't want to install binaries compiled against the wrong version of the C library). I heard that newer Debians have some feature like this, is it true?

      --
      -- Ed Avis ed@membled.com
    10. Re:J2EE-ish support? (for java CA) by Anonymous Coward · · Score: 0

      Yes, "apt-get install something/unstable". You have to set the default release you want to use somewhere but I haven't done that since I want the latest release anyway (which is the default).

  16. A small correction by felipeal · · Score: 0, Flamebait

    The project is called Jakarta, not Jakarata:

    Read more at The Apache Group's Jakarata site.

  17. Tomcat As the Anti.NET? by Lethyos · · Score: 4, Interesting

    This project seems that it could fill the role of a great that that Sun wanted to accomplish with Java. The versatility of Servlets is quite extensive and it makes me wonder why, in the shadow of this project, the OSS community is spending time on dotGNU and Mono.

    Tomcat has tremendous potential to deliver robust, complete apps in the same way .NET wants to. And, it's not restricted to Windows.

    Is my thinking correct in that we can level this software against Microsoft's upcoming ventures? Can we make a .NET killer out of this, or am I thinking about driving a screw with a hammer?

    --
    Why bother.
    1. Re:Tomcat As the Anti.NET? by Anonymous Coward · · Score: 0
      This project seems that it could fill the role of a great that that Sun wanted to accomplish with Java. The versatility of Servlets is quite extensive and it makes me wonder why, in the shadow of this project, the OSS community is spending time on dotGNU and Mono.

      Because Java still consistently sucks ass, drags ass, and is still up the ass of an almost-ran Microsoft (aka "Sun")?

      Thank you, drive through.

    2. Re:Tomcat As the Anti.NET? by Lethyos · · Score: 3, Insightful

      Because Java still consistently sucks ass, drags ass, and is still up the ass of an almost-ran Microsoft (aka "Sun")?

      Point by point here, how does Java suck? Java is a great language for all kinds of tasks. The extensive API already available for it is a big plus, and it is, for all intents and purposes, truly cross-platform.

      Java is not as slow as most people claim. Like any programming language, performance is dependent largely on the programmer. A lot of programmers with poor skills use Java because they can focus on their tasks instead of building the tools to do said task. Here's an article on /. with more details about this. Also, pay attention to this article before yoiu make further claims that Java performance is bad. And of course, you could try actually coding something using the language. :P

      Sun has done a lot of good for the OSS community. If you'll notice OpenOffice, and well, Java is a great piece of code for the Linux world. I'd say that Sun != Microsoft. Get a clue.

      --
      Why bother.
    3. Re:Tomcat As the Anti.NET? by ThePreciousRoy · · Score: 0

      I'm abit afraid of the licensing in Java right now... Don't get me wrong, I'm a huge java fan... But the enhydra incedent and just some of the wording in the SCSL...

      http://www.sun.com/981208/scsl/principles.html

    4. Re:Tomcat As the Anti.NET? by Pengo · · Score: 2


      Tomcat is great if web pages are your goal.

      It's not a J2EE complient system, you have to use something like JBoss with it to do that.

      Also, what does tomcat do to help my php/python/perl and (yes) windows software? Not much unless I integrate into it XMLRPC or SOAP which is not trivial.

      I don't believe that J2EE is very accessable unless your using a java client, again if there are solutions out there, they are hardly well accepted or trivial to impliment (unlike XMLRPC for example) I suppose.

    5. Re:Tomcat As the Anti.NET? by Kerg · · Score: 1
      Also, what does tomcat do to help my php/python/perl and (yes) windows software? Not much unless I integrate into it XMLRPC or SOAP which is not trivial.

      JBoss 3.x series will natively support SOAP and Web Services. If that is enough for your integration needs, then we hope to have a solution available for you soon.

    6. Re:Tomcat As the Anti.NET? by Anonymous Coward · · Score: 0

      Sun didn't shutdown Enhydra. Lutris did. They're just trying to place the blame on Sun instead of admitting they were all about screwing the Open Source community.

    7. Re:Tomcat As the Anti.NET? by Anonymous Coward · · Score: 0


      Not so much as screwing, just being incompotent.

      "Let's not bother writing our own code - let's use Sun's, and then blame them when they won't let us GPL it!"

    8. Re:Tomcat As the Anti.NET? by ThePreciousRoy · · Score: 0

      I know sun didn't do it directly... and honestly I dont know that much about the project... But after looking at the SCSL I can understand why projects would be a bit leary...

    9. Re:Tomcat As the Anti.NET? by Paul+Bain · · Score: 1
      Tomcat and other open-source J2EE servers (e.g., jBoss, a J2EE application server) are not the only things that we (in the Linux and open-source community) need to compete with MS's .Net. We also need open-source implementations of Web services, whose components include SOAP, a derivative of XML-RPC. Web services comprise a crucial part of the foundation of .Net. IBM has developed some documentation on configuring Tomcat to work with SOAP. The other components of Web services include:

      a) ebXML;

      b) eXtensible HTML (XHTML);

      c) Universal Description, Discovery, and Integration (UDDI), and

      d) Web services description language (WSDL).

      --

      A lawyer & digital forensics examiner. Also an expert on open source software (OSS).
    10. Re:Tomcat As the Anti.NET? by mikera · · Score: 2

      The fact that IBM are willing to bet a billion+ on the Java/Websphere/Linux combination has convinced me not to worry about the licensing too much.

      You can bet that IBM's lawyers have done the worrying for you.....

  18. slightly offtopic, other jakarta stuff by frknfrk · · Score: 3, Informative

    also ant 1.4 was released recently (couple weeks ago). ant is a great build tool, i don't want to get into its features here (java and xml based build, replaces makefiles for my java builds, integrates with some IDEs and build verification/unit test tools (JUnit)). the reason i post here is because ant started out as a little tool with which tomcat developers build tomcat, and grew into its own tool. ant home page on jakarta.

    --
    The REAL sam_at_caveman_dot_org is user ID 13833.
    1. Re:slightly offtopic, other jakarta stuff by Anonymous Coward · · Score: 0
      Also a new version of JBoss (2.4) was released a few weeks ago. It is an amazing piece of Open Source software. If you require a complete J2EE solution with database integration, messaging, transaction support, pools and thread & memory management you should check it out. Integrates with Tomcat extremely well too.

      www.jboss.org

  19. J-Run by ajs · · Score: 2

    Can someone speak to us lay-people (when it comes to Java anyway) about the differences between Tomcat and J-Run? Are the competitors? Do they fit different niches?

    I'm just wondering because I know some folks who are looking at upgrading J-Run, and I might advise them to check out Tomcat instead if that makes sense.

    Thanks!

    1. Re:J-Run by cheezedawg · · Score: 1

      Well, Tomcat is a web server (jsp and servlets) and J-Run is an application server (EJB). No- they are not competitors.

      Does that answer your question?

      --
      "The defense of freedom requires the advance of freedom" - George W Bush
    2. Re:J-Run by Mad+Browser · · Score: 1

      It depends on which version of JRun you are talking about.

      JRun Enterprise also has an EJB container, which would be comparable to JBoss w/ Tomcat integrated.

      All other versions of JRun would be direct competitors to Tomcat.

      --
      RateVegas.com - Vegas Reviews
    3. Re:J-Run by jefflinwood · · Score: 3, Informative
      Yes, they're competitors in a way.

      JRun is commercial, from Allaire/Macromedia. You can download it for free, though, at Allaire. They have several different versions to download. Professional and Enterprise are the full version of the product, but with a 30-day time limit. You'll need a license key. The difference between them is that Enterprise supports EJB, JTA, and JMS, which are Java API's for building complex applications on the server. Tomcat is like Professional in that it supports JSP and servlets, which are similar to PHP and CGI Perl for all you non-java slashdotters.

      I actually don't have performance numbers for Tomcat 4.0 and JRun 3.1, since Catalina just got GA'd. If you can live without the support for JRun from Macromedia, and you want to save about a thousand bucks a server, give Tomcat a chance. You're probably not using EJB (Enterprise JavaBeans) anyway, since they were only supported in JRun 3.x.

    4. Re:J-Run by conan_albrecht · · Score: 1

      Try Resin at http://www.caucho.com/. It is a direct competitor to Tomcat but is much faster and easier to administer. It is also rock solid.

      However, I haven't tried Tomcat 4.0 yet, FWIW.

      Another difference is that Tomcat's free, while Resin is only free if you're not making money on your site.

    5. Re:J-Run by ThePreciousRoy · · Score: 0

      It has both an EJB server and a Servlet/JSP engine... The EJB part is kinda new I think...

    6. Re:J-Run by ChannelX · · Score: 1

      As already pointed out they are very similar. However I have to say you should check out Orion if you need full j2ee capability in a damn fast server (Oracle licensed it for their own j2ee offerings) or Resin. Resin is cheaper but doesnt include the EJB stuff. Orion/Resin are both free for development use and licenses are $1500/server for Orion and $500 for Resin (I think). give em a look. Tomcat is the reference platform but unless they really did some tweaking Orion and Resin both blow it out of the water.

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    7. Re:J-Run by ChannelX · · Score: 1

      http://www.zdnet.com/products/stories/reviews/0,41 61,2714317,00.html

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    8. Re:J-Run by Tsujigiri · · Score: 3, Informative

      And if you do need EJB support, give JBoss a look. It's open source and intergrates well with Tomcat to provide the EJB side of things.

      --

      "I'll take the red pill. No! Blue! AAAaaaahhhhhhhhh"
      - Monty Python meets the Matrix

    9. Re:J-Run by Anonymous Coward · · Score: 0

      If you are working on a Windows-platform Tomcat is much faster then using PHP/CGI, each request gets it's own thread instead of another proces.

    10. Re:J-Run by djweis · · Score: 1

      I think Resin is one of my favorite pieces of software. I tried for a week to get Tomcat 3.2 integrated with our (admittedly odd) Apache config with no luck. The ssl config was horrible and you needed to restart apache and tomcat if you changed your config files. I got Resin configured and running with SSL in about an hour. It will automatically reload itself if the config file changes. The connector between apache and resin will automatically reconnect if you restart one or the other, also. It was more than worth the money.

    11. Re:J-Run by Doo-da-man · · Score: 1

      Tomcat 4.0 is incredibly slow, throughput-wise, and it's not scalable at all.

      I've done internal benchmarks with Tomcats 3.2.3, 3.3 and 4.0. Tomcat 3.3 is around 7x faster than the other two. Tomcat 4.0 isn't meant for production (yet), but eventually they'll get around to making it faster now that it'll enjoy a wider distribution on the back of Sun's J2EE marketing.

      Orion, Resin and JRun 3.x are all faster and more scalable than any version of Tomcat by a longshot. So is Weblogic 6.x, for that matter. Any app server that embeds Tomcat is as slow as Tomcat on the Web tier, and that includs Borland and iPlanet (though Borland, at least, makes up for it in EJB performance).

      --
      "Sometimes the light's all shinin' on me, other times I can barely see."--R. Hunter
    12. Re:J-Run by Doo-da-man · · Score: 1

      Dug up our performance white papers and benchmarks on this. Doesn't include Tomcat 4.0 or 3.3, but does include 3.2. For now you'll have to take my word on the relative performance of 3.3 and 4.0.

      JRun Server Performance Reports

      --
      "Sometimes the light's all shinin' on me, other times I can barely see."--R. Hunter
    13. Re:J-Run by Luyon · · Score: 1

      Also note that the performance paper is for JRun 3.0. JRun 3.1 has additional performance enchancements. I'd say a good 25% improvement. Plus the petstore problems noted at the bottom of the 3.0 guide have been fixed.

  20. Why use PHP? by heretic · · Score: 2, Interesting

    Not trying to indulge in a religious war, but I'm curious as to why PHP is so popular when JSP provides a much more robust solution. IMO, JavaScript is a real language compared to PHP's half-hearted C-like syntax, and it implements a real object model, again unlike PHP. I'm also uncomfortable with Zend's pricing scheme for their optimizer, whereas I can choose to use a JVM with JIT when using JSP at no cost. I also don't need to worry about proprietary caching schemes.

    1. Re:Why use PHP? by MSBob · · Score: 2

      Well, we use JSPs because everything else we do is 100% java so it makes sense for us. Having said that though my personal and very subjective experience is that PHP pages are quite a bit faster than those generated by JSPs. Obviously it's nearly impossible to benchmark those things byut from experience I'd say that it's easier to create fast pages in PHP whereas with servlet/JSPs it's easier to create robust pages. Not very scientific I know, but here's my $0.02 on the subject.

      --
      Your pizza just the way you ought to have it.
    2. Re:Why use PHP? by JediTrainer · · Score: 2

      why PHP is so popular when JSP provides a much more robust solution

      Let's not forget that there are alternatives to JSP which might be even better to work with. I would strongly encourage you to check out Velocity.

      Don't want to get into a religious war about this one, but I can say that when I was evaluating my company's Enterprise solution a few months ago, Velocity seemed to be more flexible and offered a better way to separate design from code. JSP suffers from the same things that haunt developers using ASP - it's much too easy to end up with dirty (extremely dirty) code after a few rounds of maintenance.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
    3. Re:Why use PHP? by mikera · · Score: 1

      Hope that's a typo and you're not really getting JSPs and JavaScript confused - they are two very different technologies with very different uses.

      JSPs rock. Javascript is often useful but can be a PITA because you can never really trust client-side technologies.

    4. Re:Why use PHP? by Anonymous Coward · · Score: 0

      Speed, ease of use, maturity of code, huge availability of pre-written applications. That's four. I'm sure others will think of more off the top of their heads.

    5. Re:Why use PHP? by ThePreciousRoy · · Score: 0

      JavaScript? Java Server Pages....

      Doesn't every container have a way to cache JSPs?

      JSPs are first made into servlets then compiled into byte code then run on the VM... and they encourage developers to put BLL in the view! PHP and JSP and ASP all suck... use a template engine.

    6. Re:Why use PHP? by jefflinwood · · Score: 2, Informative
      One big reason PHP is popular is that servlet/JSP web hosting is expensive compared to PHP for small sites that use shared web servers. If anyone knows of any cheap (less than $15/mo) places that let you run your own servlets against a database, let me know.

      For $10/mo, I get PHP/MySQL, unlimited bandwith, unlimited hard drive space, unlimited POPs, etc.

      Plus there's cool stuff like PHPNuke, just getting a simple contact me mail-to form to work in PHP is a piece of cake.

      Oh and a small correction - JavaScript has nothing to do with JSP or Java programming at all.

    7. Re:Why use PHP? by heretic · · Score: 1

      Whoops you're right -- I meant Java not JavaScript. Probably a residue of working with server-side JavaScript many years ago.

    8. Re:Why use PHP? by heretic · · Score: 1

      Yes, I meant Java, not JavaScript. Mea maxima culpa.

    9. Re:Why use PHP? by crisco · · Score: 5, Informative
      • Because Java / JSP is just getting to the point of ease of use that PHP was a couple of years ago? In terms of strength as a language and a platform, JSP and Servlets have PHP beat. But the entry level is much higher, think of the arcane xml files to get your programs working in the directories you want. With PHP you just drop things in and they work, often easier than CGI. Consider how many people start, diving in and messing with code. Now imagine you wanna do that with a servlet? Not that it is difficult, it is just a little harder than with PHP.
      • Because PHP / MySQL are standard at many cheap webhosts and with many Linux distros? And jsp / servlets aren't.
      • The OSS community's mistrust of Java and Sun and anything related to them.
      • Momentum and established codebase. Need a shopping cart, weblog, photogallery, or bulletin board? Head over to freshmeat and take your pick of PHP and Perl solutions. Want it in Java? Hmm, slim pickings...
      --

      Bleh!

    10. Re:Why use PHP? by DigitaLunatiC · · Score: 0

      You can make templates with PHP. I do it with my site, changing one thing on the template changes the entire site if you set it up right. But it's not like DreamWeaver (if you've ever used it) in that it has to update all the pages, it's just a page that inserts data into it. If that makes sense to you... anyway, PHP is a great language. It's very easy to make sites with as you can fix minor bugs on the entire site all at once.

    11. Re:Why use PHP? by jefflinwood · · Score: 1
      PHPWebHosting - I found it as a recommendation on a slashdot thread a couple of months ago.

      From their web site...

      125 Megs of Diskspace + more for free as needed

      Un-metered Transfer - note: no hosting of porn, file archives, warez, etc. allowed

      SSH Access 24 hours a day (ssh is a secure replacement for telnet)

      FTP Access 24 hours a day

      It's finally here! Un-metered pop3 mailboxes!

      unlimited name@yourdomain.com email aliases

      unlimited email forwards

      unlimited mailing lists

      1 MySQL Database

      Additional MySQL databases as needed(no extra charge)

      Use of php4 (as an apache module and as a cgi)

      Your own CGI-BIN directory and ability to run your own scripts

      Use of Perl programming language, python, c, c++

      Use of all standard Unix utilities

      Reasonable use of crontab allowed - no jobs that run every minute, etc.

      Background processes (which run continually), servers, bots, etc. are not allowed

      Access to web-based control panel

      Use of SSL(with our certificate or yours)

      I don't have any affiliation with them except as a happy customer.

    12. Re:Why use PHP? by ThePreciousRoy · · Score: 0

      You are instantiating Object in your view right? Putting logic in a view is a bad idea... in my opinion... Server Side scripting languages like PHP and friends encourage too much business logic in what should be a view...

    13. Re:Why use PHP? by hrbrmstr · · Score: 1

      alot of the other comments on this one bring up very good points.

      an additional one is that php/perl tend to be "anything goes" environments. as a reference, i've played with PHP-Nuke and have installed and regularly use IMP (the horde.org awesome webmail package). i also test drove the latest slash *:^) as an example, if you take a look at the code for Nuke, you'll see... well... chaos.

      servlets/jsp's have an entire community around them that propogate ideas like "model-view-controller" and code vs presentation. there are standards and debates with alot of critical eyes on the end-result code. this can be intimidating for "getting-started" users.

      php/perl encourages (perhaps "allows" is more appropriate) the opposite - code it quick, put anything anywhere and watch the web pages fly by (literally, since both apache modules are very good). if you've hacked a quick weblog or gallery-viewer, you'll have a ton of folks screaming to use it (go freshmeat and sourceforge!).

      probably the biggest "problem" with getting java server stuff into the open source sommunity and into the hands of those "screaming" masses of people is that the developers wind up actually coding for dollars rather than coding for the community. there are a ton of commercial java server implementations with large-company support backings (e.g. JRun, WebLogic). PHP has...?

      plus, the learning curve for java (jsp/servlets/et al) is also (IMHO) much steeper. it's really alot harder to develop a redistributable weblog in java than it is to in php/perl.

      for php/perl, you need to only compile in the packages and run one server (not even a compile in some os distros). for tomcat/jrun/servletexec, you've got to get apache + a plug-in that needs configuration, then the java server itself, all comfortably working together (if you want to do it "right"). then *try* to find a cheap hoster! (actually, check out the latest ed of java dev journal for references to some hosting refs, some not too bad).

      truth-be-told, i find myself always doing a mix of the three. i use perl where i need alof of personal control and flexibility, php when i need to get "off the shelf" components up quickly (esp to prototype or show examples), and java to do calculated, larger, structured projects.

      fundamentally, tho, perl/php have captured the spirits of a larger number of visible, devoted net-developers because of their very nature. java, while awesome, popular and a force to be reckoned with seemed to be raised to the level it has out of industry necessity (JSP's came about primarily to combat the dreaded MS ASP's).

      --
      Mind the gap...
    14. Re:Why use PHP? by run2000 · · Score: 1
      Let's not forget that there are alternatives to JSP which might be even better to work with. I would strongly encourage you to check out Velocity.

      As long as we're talking about templating engines, you might also want to have a look at the alternatives as well.

      As mentioned below, Velocity is one of the possibilities, but there are others, including Webmacro, FreeMarker, and Tea. Each of these have thier own advantages and disadvantages, but all primarily focus on have a Model-View-Controller architecture, and try and enfoce separation between templates and the data the populates them. This is usually where JSP and ASP sites tend to fall down in practise.

      And yes, I do have a favourite ;)

      Nicholas.

    15. Re:Why use PHP? by Pengo · · Score: 2

      Personally,

      Perl & PHP are (imho) closer to the systm. I am currently writing an asset managment system that tracks and organizes various files as well as performing various operations on those files.

      All of our main application servers are running on Java (Resin, not Tomcat though ;-). I have found that in pure database management java can be much easier if you use the right tools. I personally am VERY effective using JBuilder in Linux to build JavaBeans and then dive into VI w/the webdesigners on implimenting them with JSP. I know that there are various other template systems out there, but we are very comfortable with the quarks of JSP and once you spend the time getting used to the ERROR messages of JSP, it's hard to let go. (Maybe like learning REGEX syntax of perl?:)

      For the project I have on my radar, I don't know if JAVA will let me take advantage of all the native unix command line tools that are out there. I don't know how other programmers feel about taking advantage of chaining unix tools from within programs using things like system forks, etc., but it has helped me write very robust code and impliment it in a way that puts solutions out the door fast.

      Unfortunately the problem I have with Java (it's getting better.. ), is when there is any threading in the picture, things go fast until things get VERY concurrent with lots of users. Maybe I am not a good enough programmer to overcome some of these problems, (I have only been programming professionaly for about 4 1/2 years, 2 of which exclusively with Java and previous in C/C++/Perl). I have had situations where I have gotten myself into trouble with unmaintainable code with PHP, I think most beginner PHP programmers do, but I am not making that mystake now.

      The nice thing about technologies such as XMLRPC / SOAP .. it will REALLY let us choose the best tool for the job, and communicate openly with other 'best of breed/for job' tools.

      PHP can be a very valuable tool because it illiminates a lot of the details that frankly, most people like myself just get themselves into trouble with. One other point, I have never gotten myself into a performance hole with PHP, Java I have. I have learned from those mistakes of course and probably wouldn't have any problems with performance if our team had the chance to rewrite all the java from scratch, hindsight is 20/20.. but I guess that is what experience brings you.

      Maybe when I am 10 years old and have a few more hairs on my chin, I will be able to pickup any language and not dig myself into a pit. ;-) But understanding your OWN limitations and abilities as a programmer is JUST as important as picking the right language, some people are just not ready for some languages. Some people don't have the patience to finish the job correctly with a System level language, as some do.

      Experiment with all the environments, you will find what suits you best... I personally am still waiting for a viable alternative to Zope as Python is my language of choice.. I am still waiting for PHP to impliment Exceptions so I can write better error trapping, and I am STILL trying to hone my skills so that I don't write bad and inefficient code and proclaim 'JAVA IS SLOW' when in reality I could of done 101 things different to get outstanding performance.

      Hope this helps

    16. Re:Why use PHP? by Ian+Bicking · · Score: 2
      One other point, I have never gotten myself into a performance hole with PHP, Java I have.
      I have a feeling this has to do with levels of abstraction and layers of code. PHP, with a rather weak object system and a tendency to use so many global variables, tends not to encourage many levels of abstraction. You write in terms of the primitives of the language -- of which there are a lot. That's fast, you're running lots of stuff that's implemented in C.

      You won't be getting that with Java. Not only is nothing in C, but there's so many, many layers of Java that you are working with. The plus side is that you are working with a well-abstracted framework.

      I personally am still waiting for a viable alternative to Zope as Python is my language of choice
      Check out Webware, which has a lot of similarities to Java Servlets, only in a nice, compact language :) I've never programmed Java Servlets, but the Hello World examples I've seen look absolutely painful. Anyway, I like Webware a lot. A slightly more recent arrival with a less Java feel is Skunkweb. I haven't used it, but the developers seem like competent and friendly people.

      Like Tomcat, you're unlikely to get either of these working in shared host situations.

    17. Re:Why use PHP? by Gollo · · Score: 2, Informative

      And if you wish to continue to use JSPs, check out Jakarta Struts. Struts provides a very nice way to continue using JSPs whilst still getting complete separation of presentation/controller/business logic. Highly recommended.

      Gollo.

    18. Re:Why use PHP? by JediTrainer · · Score: 2

      Agreed - all of these template engines clearly have advantages and disadvantages.

      My favourite parts of Velocity (and Webmacro, which inspired Velocity), and likely the other template engines, is that unlike with JSP I can use it to produce virtually anything I want. For example, currently I use Velocity templates on my production server to generate web pages, XML (for data transfer to customers and/or partners) and email notifications (by pumping the generated text out into whatever OutputStream I want, I can send it anywhere). When changes are needed, it's easy to implement, and often just a quick job in notepad does the trick. Plus, auto-reloading of templates is a huge bonus for me - Tomcat's automatic servlet reloading didn't work, but being able to change my templates on the fly has helped me a great deal when handling issues with our production box.

      On the negative side, I didn't like Velocity's default configuration, which I found confusing when dealing with defined Macros (all macros you create in any template are declared in a global namespace by default, for example). This can be changed, however, by carefully reading the docs and writing your own configuration file.

      I'm not familiar with Tea or FreeMarker, but I imagine they have similar capabilities.

      --

      You can accomplish anything you set your mind to. The impossible just takes a little longer.
    19. Re:Why use PHP? by djweis · · Score: 1

      There isn't really a speed difference between java and php, depending on how the jsp engine of your servlet runner works. I'm willing to trade off some runtime speed for ease of development, connection pooling, and a consistent database api out of the box.

    20. Re:Why use PHP? by MikeBabcock · · Score: 2

      Some of the reasons I like using Python for my backend apps:

      • Objects can be copied to local names to avoid dereferencing the same object over and over again:
        myfunc = foo.bar.stuff
        myfunc(1)
        myfunc(2)
      • Adding new C-compiled functions to the system libraries is quite easy and allows you to implement speed-concious code as tightly as possible.
      • Objects are easily serialised with Pickle and can be stored in a database field to be retrieved later, with all their state stored properly.
      • It has a good concept of scope and allows for nested functions.
      • It allows me to use casting on variables, like C, and check variable types, to avoid common programming errors.

      I'd be interested in a JSP-like front-end to Python objects as well.

      --
      - Michael T. Babcock (Yes, I blog)
    21. Re:Why use PHP? by n-baxley · · Score: 1

      * The OSS community's mistrust of Java and Sun and anything related to them.

      Why would that have anything to do with why PHP is better than Java? Your other points are good though.

    22. Re:Why use PHP? by ahde · · Score: 1

      I think you just convinced me to try to overcome my indentation snobbery.

    23. Re:Why use PHP? by MikeBabcock · · Score: 2

      I'm glad to hear it; I'm actually quite suprised by how long it took me to bother to try Python as well. I think it was when I discovered how much RedHat was using it for building their new installers, etc.

      --
      - Michael T. Babcock (Yes, I blog)
  21. Help! by JediTrainer · · Score: 2

    Any word on whether they support IIS integration like the 3.x line did (via mod_isapi.dll, which hooked into the ajp12 connector)? It was fantastic, and helped bridge my application while it was being rewritten into Java-only.

    I can't seem to find any docs on how this might work, nor could I find any information on ajp12 at all in the 4.0 documentation! Now that the app has been rewritten (completely, finally) away from VB/asp to Java, it is possible to move to Apache (on any platform, since the code was carefully written to avoid platform-specific issues), but I'd still like to have the option of sticking with IIS at least for testing/benchmark comparison purposes...

    --

    You can accomplish anything you set your mind to. The impossible just takes a little longer.
    1. Re:Help! by selectap · · Score: 1

      That's the reason why I haven't used 4.0 yet....I wrote to the tomcat user list asking this same question a few weeks ago and I got one response from some guy saying "it dosen't exist yet..." I searched the web and the mail archives and came up with nothing. I plan on upgrading as soon as the IIS connector comes out (because I have to use IIS @ work...legacy applications written in asp can't go)

    2. Re:Help! by Anonymous Coward · · Score: 0

      Yes.

      You use the same mod_isapi.dll, using ajp12 or ajp13. Configuring it on the tomcat side is a matter of changing one line of one tomcat config file.

      On the other hand, making the IIS side of it work at all reliably is remarkably painful.

  22. Towards a 100% Katz Journal by Anonymous Coward · · Score: 0

    I'm just waiting for Jon Katz's next ill-considered, ignorant and naive political rant! I just can't get enough of his stupidity. Maybe he can spin it off into his own idiotic website.

    1. Re:Towards a 100% Katz Journal by Rich+Katz · · Score: 1

      I'm sure Jon appreciates you for it. I'm glad to see he can inspire so many people such as yourself.

      But tell me something. Just why are you waiting for Jon on an Apache/Jakarta Tomcat thread?

      No, I'm not a immediate relative, but I did go a birthday party of his once.

      Regards,

      Rich Katz

  23. JRun is better... by hendridm · · Score: 2, Interesting

    I dunno, Tomcat's configuration is horrible and I couldn't get it to run as a service on Windows, which is worthless. JRun has a very simple configuration interface, works well, and doesn't require editing of cryptic text files. They also have a free version available for development.

    IMO, Simplicity isn't necessarily a bad thing...

    1. Re:JRun is better... by Anonymous Coward · · Score: 0

      I have successfully installed Tomcat as a service on my Windoze machine. I used an application called gservany with is freeware and very easy to use. I've worked with companies who used JRun 3.0 and it was extremely buggy and Allaire proved unwilling to address our issues. I have not used Resin, but I do know that Tomcat is very simple to install and configure. The only advantage to JRun is that it provides a web interface to administrate the server for those who don't like to get their hands dirty.

    2. Re:JRun is better... by pointwood · · Score: 2

      Which version of Tomcat are you comparing JRun with?

      Yes configuration of earlier versions of Tomcat is horrible, but from what others have written here, Tomcat 4 is quite a different beast.

  24. For Newbies: grok www.jsptut.com by Anonymous Coward · · Score: 0

    This tutorial is really good and very easy to
    follow, even though - or maybe because - they
    plug blazix on windoze as the demo engine.
    Which works remarkably well, I must admit.
    The tutorial is generic, so you won't pick
    up anything specific to Tomcat, but last time
    I looked getting Tomcat to say 'Hi mom' was
    simple enough.

    Also, unrelated, their www.ejbtut.com is
    doing a fine job getting mortals started with
    J2EE EJB.

  25. mod_jserv should work as well... by Anonymous Coward · · Score: 0

    the ajp12 and ajp13 protocol are those used btwn the Apache Web Server frontal and the multiple Apache Tomcat instances ....

  26. performance by iggyflashbulb · · Score: 1

    I just did a very informal test of a few implementations:

    Apache+jserv+gnujsp: 109.50 pages/second
    Resin 2.0.2 standalone: 55.87 pages/second
    Tomcat 4.0 beta: 24.65 pages/second
    Tomcat 3.2: 10.08 pages/second

    The page I tested was the hello.jsp one that comes with gnujsp. I'm on a PIII 800 with NT 4.0 using Sun's 1.3 jdk.

    I used the MS stress tester with 10 threads and 10 connections/thread. (I was lazy ran the web server and tester on the same machine.)

    Apache/jserv was the only one that got no errors during the test. The rest failed a few hundred times.

    I did request the page on each server to compile the jsp before running the tests.

    These numbers could easily be off by 25%. What's interesting is that there's a full order of magnitude across implementations.

    1. Re:performance by DNS-and-BIND · · Score: 2

      Web server and tester on the same machine? What? Were you same the one reponsible for the Mindcraft benchmarks as well?

      --
      Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    2. Re:performance by Anonymous Coward · · Score: 0

      Apache+jserv+gnujsp: 109.50 pages/second
      Resin 2.0.2 standalone: 55.87 pages/second
      Tomcat 4.0 beta: 24.65 pages/second
      Tomcat 3.2: 10.08 pages/second


      Do you mean that you used Tomcat 3.2 and 4.0 as a stand-alone webserver? Most enterprise businesses would be using Apache to serve the html pages and Tomcat to handle their servlets.

    3. Re:performance by iggyflashbulb · · Score: 1

      This test was just for jsps, I didn't test a static html page through them. However your comment makes me wonder if I should test using Apache+Tomcat for the jsps. Does anyone know if this would improve Tomcat's performance?

  27. Re:Max by dickDragon · · Score: 0, Offtopic

    Big lips => good seal

  28. J2EE 1-2 years ahead of .net by Anonymous Coward · · Score: 0

    The Java and J2EE give you an environment
    guaranteed to be free of the Evil Empire(tm).
    And it just makes plain sense, archtecturally
    speaking.

    If you want it as open source, there's still some
    work left to do, but at least it's possible.
    The Apache project is doing an excellent job,
    and Tomcat is living proof that Sun is willing
    to cooperate with the OS community (although
    they could open up their reference implementation
    some more).

    But make no mistake, if M$ can gain any
    significant market share with .net it will
    leverage it's OS dominance to make it dominant.
    Pretty much everything is at stake:

    Linux+Apache+JBoss+Postgres != Windoze+IIS+.net+SQL Server

    1. Re:J2EE 1-2 years ahead of .net by tkrotchko · · Score: 1

      I agree, however, the implementations of J2EE have so far been so expensive they aren't practical for most people.

      It would be nice if Sun released a free J2EE implementation for Solaris.

      --
      You were mistaken. Which is odd, since memory shouldn't be a problem for you
    2. Re:J2EE 1-2 years ahead of .net by Kerg · · Score: 1

      Why not use the free JBoss implementation? Works on solaris.

  29. The bleeding edge: Tomcat + GCJ by Anonymous Coward · · Score: 0

    For a completely Free solution, check out http://sources.redhat.com/rhug.

    Create native shared libraries for xalan, xerces, tomcat, which native shared library servlet support. Requires the very latest gcj and runtime from the GCC development sources.
    Just "configure; make; install; tomcat"

  30. Re:Good places to start? TDK by dickDragon · · Score: 1

    The Turbind development kit on the same site
    has a working sample app.

  31. Jakarta = Sun by dickDragon · · Score: 1

    All of the Jakarta developers work for Sun.

    1. Re:Jakarta = Sun by Sam+Ruby · · Score: 1
      All of the Jakarta developers work for Sun.

      I don't.

      See Jakarta's whoweare.

      --
      - Sam Ruby
    2. Re:Jakarta = Sun by Westley · · Score: 1
      That's blatantly untrue.

      Have a look at Who We Are from the Jakarta site - and that's just the project management committee. Some names from Sun, certainly, but far from all. As someone who's had a few patches etc accepted for Ant (and hopefully a few soon for Log4J) I probably count as a Jakarta developer too, and I'm not with Sun.

      Jon

  32. Tomcat lacks documents? by Codeala · · Score: 1

    The Subject line says it all, Tomcat needs good documents. The current FAQ is just not a good way for new users, who don't even know what they should be asking. And please don't assume the user know much about JSP and Servlet during installation. Many, like myself, just want to install it so we can start learning JSP! The latest version of web.xml and server.xml now contain more verbose comments on various settings, which is a big improvement on the old ones.

    The Apache document is a good example of how it is done. It contains details on every single configuration options and plus entire chapter on common tasks (eg DSO, Virtual Host). The Apache default conf file is probably the best commented of its type out there, sometime you don't even need to refer anything else to fully configure your installation!

    Note that this is NOT an attack on Tomcat as an application, once it is installed by someone who know what they are doing, it runs great. It is just that the initial step is very difficult for many people. Hopefully now that 4.0 is out, the developers can spend more time on documentations.

    --

    Codeala - Just another mindless drone
    1. Re:Tomcat lacks documents? by GrayArea · · Score: 2, Informative

      Actually, I find the 4.0 documentation to be much better than previous versions. It also has very good quality in general when you compare it to 99% of other open source projects out there, not to mention some commercial products. You should check out their how-to's, you'll see what I'm talking about.

      --
      "The deluded are always filled with absolutes. The rest of us have to live with ambiguity." - Aristoi, Walter Jon Willia
  33. Tomcat is a REFERENCE impl by Fate · · Score: 1

    For all you OSS kids out there who are beaming at everything the Apache group puts out like it's gold dust, maybe it's time to look a little bit further afield if you actually care about performance, robustness, scalability, and general developer friendliness.

    I can't speak for any of the rest of the Apache group, since I have no experience with that side. However, I can safely say that the Java Apache group on the whole puts out some truly awful things, that only make it because of the clout and rep that the 'Apache' name brings.

    Tomcat is supposed to be a reference impl of the spec as put forth by the servlet expert group. In reality, the tomcat people are on that expert group, and do their utmost to spread a broken spec because 'we implemented it that way'. The spec has a number of very annoying failings (with regards to filters and request dispatchers, as well as context issues) that only made it in because the tomcat folk thought it's too hard to implement these properly. It's ludicrous that the spec suffers, because of incompetent vendors who have too much clout.

    The only java project at Apache that works and works well is ant, the rest of the useful ones are those that moved under that umbrella and grew outside of Apache (log4j, oro). ECS is a horrific idea, Slide doesn't work in any useful manner, Velocity is a ripoff of webmacro/freemarker), etc etc.

    It's a tight knit group of part time developers, with fairly fragile egos (obviously, this is a general perception, not 100% accurate!), who often get hugely defensive about their impls.

    At the end of the day, what matters to the end (business) user is how well the product performs, how well it scales, and other such measures. I can guarantee that tomcat is bottom of the list in any benchmark you care to run against any modern servlet engine. Yet, it's hailed as a success story. Open your eyes!

    if you want a real servlet engine, go with Orion or resin (or even jetty).

    1. Re:Tomcat is a REFERENCE impl by Anonymous Coward · · Score: 0

      My own experience with Tomcat supports your points. We use Tomcat as a basic servlet container under Apache running on two Sun 250 servers. Both servers suffer from random tomcat crashes about once a week. We had to build watchdog timers to restart Tomcat each time they fail.

      The classic Apache web server on the other hand is rock solid. We have Apache servers that have been running for over a year.

      We are planing to move to a comercial server such as BEA.

    2. Re:Tomcat is a REFERENCE impl by Anonymous Coward · · Score: 0

      other servlet container vendor's code is ripped right out of tomcat. it's been known for a while now that the "reference implementation" (tomcat, j2ee) code is much more solid than what's commercially out there. Someone ought to just start selling Tomcat w/ support! (and a better config. tool).

    3. Re:Tomcat is a REFERENCE impl by OhYeah! · · Score: 1

      I have used Tomcat 3.2.x for a while now without problems. But I have to agree with the part about fragile developer egos. I posted a patch to for a small fix in the servlet engine, and received a 150 line blast about how that violated the (ambigious) spec.

      So now I have to apply my own patch with every new release. But hey, It's open, so I can!

    4. Re:Tomcat is a REFERENCE impl by Anonymous Coward · · Score: 0

      As someone who until recently worked at one of the commercial app server vendors, trust me when I say that there is no Tomcat code ripping. If there were, the products would be more compatible, at the least.

  34. Tomcat 4.0 using old documentation? by Anonymous Coward · · Score: 0

    I just installed the 4.0 dist and when i hit http://localhost:8080, I see the following:

    Tomcat
    Version 3.2.3

    Along with that, all the online docs are broken. Does anyone else see this?

  35. Re:WOo.. by blue+trane · · Score: 1

    yeah I've used both resin and tomcat and found resin easier to configure and use

  36. works great! by hrbrmstr · · Score: 1

    kudos to the jakarta team!

    from download to install and http access (on solaris 8/sparc) in 5 minutes!

    servlet filters will be very useful (been using a similar feature with atg dynamo for a while now). in fact, tomcat has a number of very useful features that are normally found in the pay-per-use java servers. when the new apache module (to tie the ws in with the js) is done, this will be a kick-butt combination!

    anyone not already in the java server game should give this new beast a try. the sample application (structure and ant build config file) makes getting started snap!

    don't forget to d/l CVS to keep your projects straight!

    --
    Mind the gap...
  37. It's no use if you want to use it on your web site by rajumd · · Score: 1
    Take a look at Sun's license for the SDK. It's for development use only, which means you can't use it for production. From the license (http://java.sun.com/j2se/1.3/j2sdk-1_3_1_01.licen se.html):

    Sun grants you a non-exclusive, non-transferable, limited license to reproduce internally and use internally the binary form of the Software complete and unmodified for the sole purpose of designing, developing and testing your Java applets and applications intended to run on the Java platform ("Programs").

    Anyone know of a JVM that I can use for a production server?

  38. Enterprise Class eCommerce Applications? by jheinen · · Score: 2
    Tomcat and Jakarta are wonderful, however does anyone know of any enterprise class open source applications or application servers that provide functionality out of the box for things like billing, subscriptions, content management, CRM, product pricing, cross selling, settlements, personalization, call center support, etc.? I'm not talking about simple storefront type stuff that mom & pop companies use, but robust applications that support complex product pricing and bundling? Or an application that provides robust CRM? I'm thinking open source versions of products like Blue Martini, Broadvision, Siebel, Portal, etc.


    If not, why not? Why aren't there more OS projects that target these kinds of mission critical applications that the enterprise needs? It strikes me that if you want these kinds of capabilities from OS software, you are basically left to building them from scratch on top of something like JBoss/Tomcat, Enhydra, etc. Unless I'm missing something, there just doesn't seem to be any OS applications targeted at these important enterprise capabilities.

    --
    -Vercingetorix
    "Necessitas non habet legem." -St. Augustine
    1. Re:Enterprise Class eCommerce Applications? by Operandi · · Score: 1

      it's because those types of packages are *very fucking complicated and complex* and are often seen by geeks as 'lame business stuff'

    2. Re:Enterprise Class eCommerce Applications? by spike666 · · Score: 1

      because these types of applications are usually designed and planned over lots of meetings, and user requirements. and until the OS community gets some of those types of business people involved as participants, it wont happen.

      also, these types of applications usually need some company specific requirements on the implementation. even if you go with a commercial product, the time spent customizing is immense.

    3. Re:Enterprise Class eCommerce Applications? by Seb · · Score: 1

      You're asking about "enterprise class open source applications" built on top of Tomcat (or some other servlet engine)? You should take a look at the Arsdigita Community System which is open-source and provides most of the things you're asking for (Content Management System, for example). It's being actively developed and yes, I'm working for Arsdigita.

    4. Re:Enterprise Class eCommerce Applications? by Anonymous Coward · · Score: 0

      ACS was using the GPL and no longer does. who wants a soon to be proprietary product?

    5. Re:Enterprise Class eCommerce Applications? by Seb · · Score: 1

      ACS is now licensed through ADPL (Arsdigita Public License). It's open source, and I don't see how it fits into definition of "soon to be proprietary product". As always, the code which is now open-source under ADPL will always remain available under same licensing terms.

  39. yeah, tomcat 3.x is a train wreck by StandardDeviant · · Score: 2
    I don't know what happened between Apache JServe (Servlets 2.0 and JSP 1.0 via things like
    gnujsp)and Tomcat, but man, talk about night and day difference in installation headaches.

    Quite frankly, I've yet to make Tomcat work completely right. Installing new servlets and writing JSPs was pretty easy under the old system, and the integration with Apache was pretty good, so you may be able to implement ~username servlet and JSPs using that system instead. (Unless you need something in the later specs.)


    (I'm fooling with tomcat 4 on a win2k machine at the moment and it does look pretty smooth, but then I've only had about 15 minutes yet to mess with it.)

  40. good points, but... by StandardDeviant · · Score: 2

    You raise good points but I think that a certain extent you're missing the point of the whole alphabet soup of Java web development (Servlets/JSPs/Beans/J2EE/JDBC/MBeans/EJBeans/JXTA /JMQ/"und blah und blah und blah" [ObLola]).


    Java [stuff] is intended to fit a monolithic development environment, where you have one application, no, make that Application, you're working on, with a team of highly (or at least somewhat) trained fellow coders wearing pinstripe suits likely on the behest of people that also wear pinstripe suits who probably do boring things like investment banking. The project manager has read The Mythical Man Month, and you all work in very formalized and well defined roles. The s(w)ervers are yours and yours alone to utilize to develop and deploy on.


    Contrast this with ISPs, smaller web shops, and individual coders. They usually work in small teams, on short projects of small scale, and on machines that are shared with a lot of people. So simplicity and resource utilization take priority over Absolute Completeness And Verifiable Correctness.


    Given that, it's natural for PHP to flourish where it does, and for Java [stuff] to flourish where it in turn does. Once again, right tool, right job.


    (Lest anyone think I'm flaming, I like both environments, for different reasons and in different places.)

    1. Re:good points, but... by crisco · · Score: 2
      Oh no, I absolutely agree, PHP would probably be a nightmare in those 'enterprise' situations. And that is an absolutely great point, right tool, right job.

      From what I've read, and in searching for an inexpensive webhost that supports JSP / servlets, it doesn't fit in well in a shared hosting environment. However, there are a few that make it work. Again, contrast that to PHP, it makes server stuff easy in a web hosting environment.

      And as for what I like, well, my weblog thing is managed by a big ugly (but very useful) Perl script, my link archive is PHP, the shopping cart I'm setting up is PHP / MySQL. But the reading and 'playing' to learn and the fascination is with servlets / JSP / other Java solutions.

      --

      Bleh!

    2. Re:good points, but... by Anonymous Coward · · Score: 0

      Hahhaa, I don't know where you work, but every single place I've ever seen or just heard of doing J2EE development is staffed entirely by exVB programmers.

      All that "Java is replacing C++" hype is total bullshit. Java is replacing Visual Basic.

      Of course, from a business standpoint, that is far better, since there are many more VB/Java programmers than C++.

    3. Re:good points, but... by Rentar · · Score: 1

      J2EE is not the entire point of Java ... you can do some pretty nifty stuff in J2SE, which I'm doing at the moment.

      well, but if Java is replacing Visual Basic, this can only be A Good Thing (tm).

      You can't write Java Programs without learning Java (at least not as long, as you can write VB-Programms without writing Programming).

      Well, I think I have to clarify this ... with some pretty hard work and a high pain-treshold, you can, somehow, write _Programs_ in VB ... but most VB-User, don't know how to do this (at least the ones I know).

    4. Re:good points, but... by Anonymous Coward · · Score: 0

      teeheehee

      that is exactly what my brother gets paid fourty grand a year to do (the bank stuff that is).

      Having said that though. As a poor student implementing a first version of a website that could grow one day to be very big, it makes sense to me to be doing it with servlets/JSP, because I know it will scale very well.

    5. Re:good points, but... by Tony-A · · Score: 1

      PHP is simple, direct, and very effective. Probably does not scale well to enterprise levels.
      Java looks like it is targeted at the mainframes of 5 years into the future with an overall complexity that would make SAP look simple. Somehow I think the real target of Java is the masses of COBOL programs in banks, insurance companies, etc.
      Actually Java and PHP work pretty well together. We're using Apache/Tomcat with jsp and php in same directories.

    6. Re:good points, but... by denshi · · Score: 2
      regarding your 'shopping cart': you should probably move from MySQL to Postgres. Yes, yes, I've heard all the carping from MySQLers proclaiming that you don't need transactions in most cases, but when your bits start representing dollars, you should consider that one of the 'important' cases.

      Better speed, too.

    7. Re:good points, but... by Skapare · · Score: 2

      <flameshields>
      People who program in VB are not real programmers.
      </flameshields>

      Now if they are switching over to Java, they may really be learning to program for real. But be careful. The easier some language is supposed to make things, the more likely it is that those who don't so so well will be able to at least do something. Thus the IQ level of programmers who use UltraEZlang++ are likely to be lower than TuffLuvLang--. The question is, which is VB and which is Java? And are these new Java converts going to end up switching again to something where they end up cutting cut on the sharp edges?

      --
      now we need to go OSS in diesel cars
  41. Hmm, reminds me of Linux. by Penguinoflight · · Score: 1

    2.3 still isn't final :-)

    --
    "And we have seen and do testify that the Father sent the Son to be the Savior of the World"
    1 John 4:14
  42. what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

    Can someone tell me what is it that Tomcat 4.0 (or any other version) lets me do that cannot be done otherwise? I know there must be something for them to put all this effort into it, but I cannot see it. If you're tempted to say "well if you can't see it, you won't understand it" then I'll say you probably don't understand it for yourself and you're doing it for the fad value of it.

    I want to know what the advantage is over say:

    • Apache with mod_perl or mod_php
    • Apache with CGI in C or C++
    • Apache with leet CGI in Java compiled with GCJ
    --
    now we need to go OSS in diesel cars
    1. Re:what is it that Tomcat 4.0 lets me do ... ? by rebelcool · · Score: 2
      tomcat is a servlet container, designed for running java servlets. Servlets are a type of java application (closer to an application than an applet really...less restrictive security sandbox)
      designed specifically for server applications.

      That's really putting it too simply, but without getting into the details of servlet design...

      --

      -

    2. Re:what is it that Tomcat 4.0 lets me do ... ? by Tyrant+Chang · · Score: 1

      Benefits depends on your situation
      But one obvious benefit over the choices you gave are every request is handled by a single process vs single process for every cgi request - but this is a very old issue and php/asp/etc is good about it

      Now benefits vs other web dev scripting languages such as php/asp/python is that java aspect of Tomcat. If you are building html-based, console based, java applet based applications simultaneously, you only have to code the main application part once and have a wrapper arround the ui aspect.

      For example, if you could have a html page (served by Tomcat or other servlet engines) that does Foo and a server application that take Foo and produces Foo2 and later have another html page so that user can get Foo2, it makes more sense to do all of them in java to have a unified code base. You could possibly do this in perl or c++ but then you run into the program I described initially. I would not consider php/asp as good application languages (although you could run them in the console) so that rules out those choices.

      Also, I personally find that Java servelets/applets/programs tend to be developed in a much more organized, semi-object oriented fashion. So maintenance tends to be easier over php/asp/perl where html and actual application overlap and you often get spaghetti code. Also as someone else has mentioned, Tomcat can be extended by modules like jetspeed that supposedly will speed up your development with very program-friendly libraries (although their documentation is horrendous - even compared to Tomcat). Also Java seems to have a lot of features that I use and works like xml parser (yes there are c++/perl parsers but java parsers seems to be better in memory leakage and abstraction), networking code, threading (yes I love java).

      Those two are reasons I'm using Tomcat/java right now.

      So if you like java, chances are, Tomcat would be a very good fit for you, if you hate java, then probably not. Your mileage may vary depending on situation.

    3. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      And why do I need servlets? And is Java the only way to do servlets? Why not servlets in say, C or Perl or TCL or Lisp or whatever?

      --
      now we need to go OSS in diesel cars
    4. Re:what is it that Tomcat 4.0 lets me do ... ? by spike666 · · Score: 1

      Java Server Pages are the java version of the Microsoft ASP pages. (yes i know that P is redundant, but isnt Microsoft?)

      in other words, you can write "code" in your HTML page, and then Tomcat will compile it on the fly into a servlet, which then runs nice and fast. (aka it wont try recompiling it each time) theres a LOT of similarities to ASP, but a lot of things fixed.

      theres a bunch of zealots, i mean, bright people who arggue that JSP (and ASP) allow you to needlessly mix Presentation and Code Logic, which is true. the Jakarta Cocoon project might be a better fit in those scenarios - Cocoon uses all XML instead of HTML, and you dont use code snippets in the pages, but references via taglibs or objects.

    5. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      I'd agree that fewer processes is better than more processes, given other things being equal. But is that because of performance issues? I've run benchmarks on the overhead of forking processes, and I was able to reach forking rates of over 9000 per second in Linux 2.4.7 on an 800 Mhz Pentium-III. While the overhead is non-zero, I think I'd focus on other matters where performance is an issue.

      Now for Java. I like the Java language. I don't like the Java run time environment. Portability-after-compile is unimportant to me. I have not started to work with it yet, but I look forward to using gcj.

      Separating application functionality from user interface is already a known idea, and it can be done many ways to make the components pluggable. Do people believe that Tomcat has an exclusive on this concept?

      With regard to your discussion of Foo and Foo2, I don't know what you are referring to. Why can't one do this in another language other than Java? And if in Java, why is it that Tomcat is a necessary part of this?

      I do worry about the apparent documentation problems. One of the things I have found that really slows down projects, whether a programming project or an administrative project, is non-existant, confusing, vague, or misleading documentation. What is it that "jetspeed" does? I'm sure it's not reading your mind and generating code ahead of your typing.

      I really want to know this stuff. I want to pin down just what it is that makes all this better. And I want to isolate the different aspects of it, for example the servlets, the environment, the language, to see which of those aspects contribute what to the benefits, and to compare how those aspects can contribute by themselves. Tomcat is more than one thing, but where's the synergy? It's not obvious to me, and I hope people are not presuming it is obvious to everyone.

      --
      now we need to go OSS in diesel cars
    6. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      So why can't I just compile my code after I write it, and run it that way? And why do I have to mix code and content? Why can't I have content (be it HTML or XML) and logic (be it in Java or C or any other language) as separate but cooperative entities, such as with tags in the content to describe to the logic where output pieces go? You're talking about some good things, but I'm still looking for why Tomcat is the only, or best, way to have this.

      --
      now we need to go OSS in diesel cars
    7. Re:what is it that Tomcat 4.0 lets me do ... ? by run2000 · · Score: 1
      Why can't I have content (be it HTML or XML) and logic (be it in Java or C or any other language) as separate but cooperative entities, such as with tags in the content to describe to the logic where output pieces go?

      You're thinking of templating engines, and there are many around. Probably more by co-incidence than anything else, the ones I've come across have all been written in Java, and co-operate nicely with Servlets (this is where Tomcat fits in).

      Have a look around at Velocity, Webmacro, FreeMarker or Tea (see my earlier post above, or Google for them), and have fun!

      Nicholas.

    8. Re:what is it that Tomcat 4.0 lets me do ... ? by ACupOfCoffee · · Score: 1
      Let's hit these points quickly and in order, but it'll take a little introduction. J2EE (servlets, EJB, JSP, etc.) is designed to be a full-fledged application development platform for delivering any type of content to any type of content viewer (ie web-browser). The basic J2EE paradigm contains three layers:
      • A backend database/information system.
      • A middle enterprise/business logic layer.
      • A frontend/presentation layer.
      Web content is one example of that third layer. The real advantage of using a J2EE system though is the middle layer. This way you can have a web page to view information and an application that you gives you a much more flexible means of presenting and altering that data, and not have to write anything more than the frontend to the data.

      Anyway, as to your points:
      • mod_perl or mod_php It functions very similarly to either of these except that you're coding is in Java with the inherit advantages (strongly-typed, large api, etc.)
      • cgi requires forking an external process, tomcat throws up a new thread inside of a virtual machine process that is already running which is much less overhead than the cgi fork. also it is faster to develop inside java as well as being safer in general (no memory leaks, better object-oriented design etc.)
      • Besides having all of the disadvantages of cgi, gcj is not a perfect rendition of java. Last I checked it was still missing a number of key pieces including good multi-threading and reflection.
      Yes, gcj is improving and for most web pages you don't need reflection or multi-threading... but that just brings back the same old issue... use the right tool for the right job. If you want a small fast page that does a few database queries, use mod_php. If you want a full featured web/internet/intranet application with good security, application managed transaction support, complicated business logic that connects to a large scale database management server and other such, use J2EE.
    9. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      You're thinking of templating engines, and there are many around. Probably more by co-incidence than anything else, the ones I've come across have all been written in Java, and co-operate nicely with Servlets (this is where Tomcat fits in).

      But the concept of a "template engine" as you understand it, doesn't specifically require Java, and could be done in say C? So Tomcat is a "template engine"? And the templates are in XML?

      Have a look around at Velocity, Webmacro, FreeMarker or Tea (see my earlier post above, or Google for them), and have fun!

      I'm sure I can find them. But conceptually, what are they? Are they template engines? Servlet processors (if there is such a term)? Ya know, a "concepts document" (that specifically does not depend on the reader already understanding the abstract concepts it's expected to explain) would go a long way to clarify things here for me. A "concepts document" is, unfortunately, a very rare thing in most things.

      --
      now we need to go OSS in diesel cars
    10. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2
      • A backend database/information system.
      • A middle enterprise/business logic layer.
      • A frontend/presentation layer.

      That's a fairly standard model. That's not specific to Java, J2EE, or Tomcat. What you do get is that in some environments, the 2nd and 3rd are not separated (or maybe not very well). PHP comes to mind.

      I built this site with PHP in one day and it was my first PHP project. The backend (1st in your list) was written in C and a shell script and not built on a usual SQL DB engine. It just consists of a cron triggered script that fetches backend data with lynx and reformats it with a different C program customized for each site (some in text format and some in RDF which was added later). The PHP code can be seen here.

      But I have concluded that fully integrated logic and presentation is not a good thing. And I've also concluded that more than one class of logic can and should exist in a single presentation. The logic to select the banner ad should be separate from the logic to summarize some news on the side rail, while yet different logic selects the main forum body (in an example forum site). I feel all those elements should be discrete reusable elements of logic. The ad banner selector could be used on other pages, for example. The page would then be built for layout and style much as a regular static web page would be, with tag elements to notate where other "sub-presentations" go. Those can then be other static elements, or logic (dynamic) elements.

      I have thought this was what JSP was supposed to be about, and the logic elements would be servlets. But I don't see where it has to be done in Java. Now that doesn't mean I hate Java. I admit I dis-like C++, but not Java. I do OO design and code it in C, but I haven't found any real advantage to doing it in C++. But I've done some programming in Pike, which I believe is better OO than C++ (but also has some limitations). Java looks to be the current state of the art in reasonably clean OOL.

      The trouble I have with Java is the JVM. I don't feel the whole portable environment thing is necessary for statically maintained applications. What I mean by that is something that stays where it is sufficiently long term to make a compilation worth while (a day). To make downloadable applications to run in a web browser, portability is now more needed since a site needs to be able to deliver something on demand that works on many different platforms. But for this I don't feel that a compiled to byte code environment is the right way to go. If Java had been compiled down to a stack engine environment somewhat like Forth, or maybe just use Forth, then I would have agreed with it.

      Basically, my goal for the server side is to have an environment that allows working with elements in the binary format of the host machine compiled from C or Java (for my choices) or any other language (compiled to binary like C++, precompiled like Perl, or interpreted at run time like Bash) that can run on the host, and integrate those as logic elements in a template based server engine. I see Java as a good choice in the system, but I also believe it should be that, a choice.

      • cgi requires forking an external process, tomcat throws up a new thread inside of a virtual machine process that is already running which is much less overhead than the cgi fork. also it is faster to develop inside java as well as being safer in general (no memory leaks, better object-oriented design etc.)
      • Besides having all of the disadvantages of cgi, gcj is not a perfect rendition of java. Last I checked it was still missing a number of key pieces including good multi-threading and reflection.

      I'm currently designing a new server which will eliminate the forking in certain cases. Assuming you don't have a switch-userid problem (which would require some kind of forking somewhere) the way it would work is that a piece of logic would be coded in C and compiled not into an executeable but into a simple module file with a .so extension. The template processor would parse for tags (and I have planned a parsing cache for static templates) in the template, and for those it finds, it would "call" the appropriate element for that tag. That could be another template (recursion loop detection engaged) or some logic. If the logic is the .so file, then it would be loaded as a dynamic library right then and called directly in the same process. If the logic is an executeable file (or a module owned by a different user in a switch-userid situation), then it would be run in a forked process. The point of the design is that all the elements can be made from any kind of executeable element the host OS can handle. And that would include Java, either as a binary compiled module (if I can figure out how to do that), a binary compiled executeable, or as a class file run by the appropriate byte code engine.

      --
      now we need to go OSS in diesel cars
    11. Re:what is it that Tomcat 4.0 lets me do ... ? by pkesel · · Score: 1

      The point isn't what it lets you do. It's what we can build an enterprise class web application with. Sure, we could build these apps iwth CGI and C++ and all that, but then we'd have to make adapters to all our other enterprise systems -- database, middlware, warehousing, whatever. If I can write a class in Java that I can use in several tiers of the enterprise it saves me a hell of a lot of trouble making odd pieces fit.

      When you're simply making a nice web page with some dynamic pieces and some simple local database access, duct tape together whatever you can make work. But when you've a hundred or so developers sharing enterprise resources across several campuses and states, you need to get a little more uniform and sophisticated.

      And yes, I'm going to say that since you've asked this question you likely haven't seen an enterprise class web app. And with your attitude you're not likely to see one soon.

      --
      - Sig this!
    12. Re:what is it that Tomcat 4.0 lets me do ... ? by pkesel · · Score: 1

      Application servers in general allow you to separate the web server and application server on separate machines. Putting the apps behind a firewall, thereby securing access to local LDAP and database, and other resources, increases security tremendously. You can also point several web servers to one application server when multiple sites may share functionality.

      Again, these are in an enterprise situation that most pretenders don't have to consider.

      --
      - Sig this!
    13. Re:what is it that Tomcat 4.0 lets me do ... ? by Anonymous Coward · · Score: 0

      An easy answer is that you have the power of the Java API at your hands for your servlets to use, and any 3rd party class libraries like JavaMail.

    14. Re:what is it that Tomcat 4.0 lets me do ... ? by angel'o'sphere · · Score: 1


      Can someone tell me what is it that Tomcat 4.0 (or any other version) lets me do that cannot be done otherwise? I know there must be something for them to put all this effort into it, but I cannot see it. If you're tempted to say "well if you can't see it, you won't understand it" then I'll say you probably don't understand it for yourself and you're doing it for the fad value of it.

      I want to know what the advantage is over say:

      1) Apache with mod_perl or mod_php
      2) Apache with CGI in C or C++
      3) Apache with leet CGI in Java compiled with GCJ



      Besides that your final sentence is realy silly ... because *you* seem not to understand. Everything you ask is allready answered in the messages above yor answer. Anyway I numbered your specific questions and answer to them.

      Basic answer: Tomcat 4.0 gives you nothing you can not do with 1) to 3).

      1) Apache with mod_perl or mod_php
      Thats not JAVA! Right?
      Tomcat runs JAVA Servlets.
      Difference: each sevlet is a thread in a JavaVM and likely jit compiled to native code.
      mod_perl and mod_php usualy generate a process and not a thread per request.
      Besides: mod_perl is perl and mod_php is PHP, both are not JAVA, your question seem not appropriated to 1)

      2) CGI can be done in any language, its basicly only a interaction protocoll used by the Web server with external applications.
      If you have a decent library for session management it should not be a big deal. If you have no such library, well a servlet is more or less a one liner (its a class so you overwrite a method and define a class name and a package, bottom line 10 lines of code).
      Again per cgi request a process is started. Passing information by calling other CGIs is hard. You need to use files or a database.
      In JAVA you keep objects in memory and call simply other servlets or use java classes from your libraries.
      Basicly: you need a descent infrastructure for CGIs, and knowledge, especialy using shell scripts is in general considered insecure(albeit you can secure them, but you need a descent amount of knowledge about how to do it).

      3) writing CGIs in JAVA means to process CGI requests by interpreting command line arguments or parsing standard input.
      For that IMHO no one ever wrote libraries.
      So you are left alone for session/connection management and digging into the data you got via an CGI request etc.
      A Servlet Engine, and the SUN Servlet API with the existing supporting classes as well as the hughe amount of output generation classes, the ability to plug servlets via filters together and and and, that all gives you a servlet engine for free (if you use a free one).

      Finaly: consider a set of "files" which generate HTML when "executed".
      Those files together build a so called web application.

      Its VERY easy to deploy (new speak for: install) such a web application several times with different configurations regarding DB access, URLs used(e.g. domain names) on the same server. And you don't realy have to think about that because the Servlet Definition, or better J2EE was designed having that in mind.

      If you like to make that with cgi you need to have the knowledge on how your web server works, where to copy/duplicate files to, how to ln them among each other, how to access configuration files, and usage of shell variables ... and so on. You have to develop yourself a schema how to run the same application in different environments on the same sever.

      Not so on a Servlet Engine or any higher level J2EE engine, liek an application server.

      Bottom line: J2EE is for *all JAVA* environments.
      All people involved can oush pure server stuff to an OS specialist or Server specialsit and concentrate on programming Java classes.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    15. Re:what is it that Tomcat 4.0 lets me do ... ? by run2000 · · Score: 1
      But the concept of a "template engine" as you understand it, doesn't specifically require Java, and could be done in say C?

      Absolutely. Having said that, one thing that Java gives you is nice introspection capabilities, that is, a template engine is able to look at a set of arbitrary business objects and map them directly into a model that the templates can use.

      FreeMarker does it slightly differently, by defining a set of simple interfaces that business objects should either implement directly, or use adapter classes that adapt your business object model to the FreeMarker one. This is probably the approach you'd want to use if you were implementing something similar in C.

      I see I didn't explain myself very well in my earlier post. Sorry, I was at work. In terms of the layers between your web server and a template engine, they work as follows:

      • At the base, your web server, probably Apache HTTPd, or similar
      • Tomcat, which is a servlet container, providing Java's "hook" into processing web requests and responses
      • Your template engine, such as Velocity, etc. Technically, JSPs belong at this level as well, though by convention a JSP container is usually bundled with the servlet container. Tomcat is no exception here.
      • Finally, your templates and business objects, providing the behaviour for your web site

      A good introduction to the concepts behind template engines can be found at Servlets.com, along with its followup article.

      None of the template engines (to my knowledge) use XML to define the template -- a template consists mostly of your presentation output, be it HTML, XML, whatever. The template control structures vary in their formats, from XML-like syntax to something that might resemble Perl or shell script constructs. You'd have to see an example or two to understand what I mean.

      Hope this helps,

      Nicholas.

    16. Re:what is it that Tomcat 4.0 lets me do ... ? by angel'o'sphere · · Score: 1


      With regard to your discussion of Foo and Foo2, I don't know what you are referring to. Why can't one do this in another language other than Java? And if in Java, why is it that Tomcat is a necessary part of this?

      Hm ...
      how do you call a perl class from a C program?
      How do you call a C++ class from a perl program?

      A JAVA class is a JAVA class, regadless wether used in an applet on a browser or in a servlet in a web server(servlet engine) or as a bean etc.

      Thats called 'code reuse'.

      Tomcat is just one of the Servlet Engines out there, just search in the internet for J2EE.

      In general code reuse inside of the same language is more painless than code reuse across language barriers.

      Regarding one of your other questions/posts: no, a java application running on a webserver using CGI is not a servlet.

      A servlet is a JAVA class which implements a certain interface or is derived from a base class implementing that interface.

      A Servlet Engine provides runtime contexts to such a class, just like the CGI interface of Apache feeds request paramters into a CGI script a Servlet Engine descides which class to load (mapped on a URL) and instanciate and prepars the request by parsing the HTTP header and preparing parameters for the servlet.

      Besides the test posted some posts above: Resin and Orion are believed to be faster than perl or PHP based solutions.

      Anyway if your server is a SUN ET 10000 with >10000 served users simultaniously, JAVA is the easyer to manage technology.

      Regards,
      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    17. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      Java also makes it difficult to use a lot of other things, including other APIs, that exist in the host system, due to it's nature of trying to establish a standard that works across all platforms. Much of the Java API appears to be re-inventing the wheel so it has a coffee color. Now that's not a bad thing, because it does provide a uniform way for a Java program to do stuff instead of trying to access methods in other languages (which, for reasons of portability, it would surely want to deny exists).

      Your statement, though, is like trying to say that the Java API is where the value is, and not the Java language. How would you feel if you were faced with another language that had an equally vast API?

      Personally, I've felt that the vast Java API is overkill.

      --
      now we need to go OSS in diesel cars
    18. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      Hm ...
      how do you call a perl class from a C program?
      How do you call a C++ class from a perl program?

      How do you call a perl class from a Java program?
      How do you call a C++ class from a Java program?

      A JAVA class is a JAVA class, regadless wether used in an applet on a browser or in a servlet in a web server(servlet engine) or as a bean etc.

      Thats called 'code reuse'.

      I know what code reuse is. Be careful, you could be coming across as talking down to people just because they don't see things the same way you do.

      In general code reuse inside of the same language is more painless than code reuse across language barriers.

      So?

      So, use the tools in the given language. Of course Java will be a good choice because there exists the Java API. But I want to know why this means that the system should restrict one to Java exclusively, as opposed to one that allows a choice for each kind of logic element. If one page or portion of a page is more easily produced by Perl, why should this not be allowed?

      Picking C++ for the moment in order to specifically avoid the OO issue, since I am addressing the issue of the usability of the API space, why is it that all this effort to produce a Java API never materialized before Java existed to produce a better API for C++? The C language has very often been said to be a poor language for many reasons, and one of them is the lack of a vast API. Well, I'll argue that the reason for that is not the language itself, but because people simply wouldn't open their editor and start building one.

      I, OTOH, do that. I write a lot of code in C, and I write lots of reusable code in the form of a new API: my own library. Don't argue that it is not standard; it could be (or another API could be) if enough people had gotten involved. My point is that almost any language could have a great API if those who value the API would have come forward and actually helped build it. I'll point to the vast set of Perl modules as an example of just such an effort. People argue Perl is a great language because of all those modules. Instead I argue that Perl is a great choice despite being a lousy language, because of all those modules. Java is certainly a great language, and a great choice for what comes with it, but that the two concepts are not limited to each other.

      Regarding one of your other questions/posts: no, a java application running on a webserver using CGI is not a servlet.

      Someone else in another part of this subthread said it was. I was looking for confirmation or denial. I'm more ready to believe your denial. Thanks.

      A servlet is a JAVA class which implements a certain interface or is derived from a base class implementing that interface.

      And what if this kind of interface or base class is built in a different language system other than Java? Does that somehow negate the advantage that the interface would have in producing a servlet? In other words, I'm asking how is it that Java the language can claim to be the only way to have a servlet even if another language has implemented the same (identical, or functionally similar for example) interface?

      A Servlet Engine provides runtime contexts to such a class, just like the CGI interface of Apache feeds request paramters into a CGI script a Servlet Engine descides which class to load (mapped on a URL) and instanciate and prepars the request by parsing the HTTP header and preparing parameters for the servlet.

      So why is it called a servlet engine as opposed to a web service engine? Why can't these things be implemented in another language and its interfaces?

      Anyway if your server is a SUN ET 10000 with >10000 served users simultaniously, JAVA is the easyer to manage technology.

      And why is that so? What I want to know is if this is due to the Java language, or the Java API, or the Java Servlet Engine, or what.

      One confusing term here is "simultaneously". How do we define this? Is it simultaneous when there are 9999 other request connections active while the first one is still having its content being sent to it? If that were the case, I'd focus on trying to find a way to deliver content faster so that the degree of concurrency is reduced. Is it simultaneous when there are 9999 other people in a "session" (another term to define) even though the machine may at the moment not be serving any connections at all because everyone is reading the document they have in front of them before taking the next step which would make a new request?

      Why a SUN ET 10000? Sometimes I wonder if SUN made Java the way they did in order to sell larger machines. I prefer to scale up with eggs spread over more baskets instead of all my eggs in one giant basket.

      --
      now we need to go OSS in diesel cars
    19. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      Take the Java language out of the picture for a moment. Plug some other object oriented language in. If history had resulted in a different language than Java, but all the web application framework and tools had been developed, would we have all the benefits we have today?

      Obviously you think I have some kind of attitude because you expressed that. But I think you have simply mis-interpreted what I did ask, and still am asking. I'm not saying Java and all that comes with it is bad. I'm trying to isolate what benefits come from the various pieces, and what benefits come from the synergy, and what synergy is dependent on the various pieces. All of the literature I have read about Java as a web development environment simply doesn't address that. It probably doesn't because the people promoting Java either think it is utterly clear to everyone (it is a common human trait for people to think that what is obvious to them is obvious to everyone, even though it is not generally true), or else they think that understanding this about it is just unimportant (i.e. that everyone should take it on faith that all this is good because they say so).

      Of course an application scaled up to the level which does require a hundred developers has very different needs than one that can be done by one or two people. I want to hear someone say just what they think the whole Java based web development system is good for ... where is the threshold? Not all applications are enterprise scale, yet many Java promoters are coming across as saying that it is best for everything, and when they also say "enterprise class" it sounds like they think everything fits that description.

      And yes, I have seen, and participated in development of one part of, a application of this scale. There were over 250 developers involved (most of whom I never met or even communicated with ... that was the job of the project managers). BTW, it was all done in C at the time, and when I left that company, they were starting to work on a transition to C++. I can believe they have switched (or are in the process of doing so) to Java by now. Their particular application requires continuous development because it involves a continuously changing business process.

      --
      now we need to go OSS in diesel cars
    20. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      I think there is an assumption that any web development that is not based on Java and its web development environment is instead based on mod_perl, mod_php, or CGI. To the extent that may be true it is due to what has been developed, as opposed to what could be developed. I believe that the framework could be done in most languages. Somewhere along the way, that didn't happen until Java came around. But why? Is it because those who would think of it were not inspired to do so until they saw Java? And if that is the case, what is it about Java that inspired them? Obviously it is not OO concepts alone because C++ would have inspired them if it were. Is it because Java is a clean OO language? Why not Smalltalk? Is it because all this was really promoted and pushed by SUN? I tend to think this is the answer. That does not mean that it is bad, but it does tell me that the scale of acceptance is not telling of the capabilities. I want to see the capabilities stand on their own. It's like why people choose to buy some widget. The salesman tries to tell me that I should choose to buy the widget because a million other people have. What I want to know is why those million other people did, and of those who did make a wise decision to do so (if any) what knowledge and information did they use to make that decision that this salesman is not willing to tell me in favor of claiming the million buyers.

      I don't want to choose Java or Tomcat because everyone does. I want to choose it because there's something good about it, and I want to especially know if that can't exist in something else (even if it doesn't, yet). And this is required before learning it. Of course I could simply presume it must be good, spend the time to learn it, then determine if it really is or not. But by then, I've spent more time learning, less time developing, and looking at a full plate of projects I know have to decide whether to go ahead and use something new I've learned which is most certainly better than what I had before, even though it might not be as good as what could be (if framework developers had been inspired earlier). Then I'd end up being "one of those who use it" and counted among the millions, even if I might have not made the choice if I had know what I needed to know to make a wise choice (for my needs). I worry that the popularity is not 100% from people who found out what it really does for them and then decided.

      I do agree that CGI (it's an interface, not really a protocol) is bad. It's a useful hack for small things and I've used it a lot. I've used it enough to know I want something better. And I am working on the design of something better. It is a template engine based on modules. It can be done object oriented, but it doesn't have to be. It can use strictly modules, or it can do other things, even shell scripts (if you want to, but then it starts to look like CGI again ... but at least the choice exists). I'm also designing it for a smaller scale than "enterprise class" applications. In that sense it would not be competing with Tomcat or J2EE or JSP or whatever. Development on the scale of one person-day projects could use this over CGI. People point to Java for "enterprise class" purposes. But I don't know that what is good for that scale is necessarily good, in whole, on the smaller scale. But if there are parts that are good, they should be used. Now the question is, can they be used on their own. To the extent my project will use those parts, we will see.

      --
      now we need to go OSS in diesel cars
    21. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      Those concepts are good ones, even on a smaller scale. But they are not exclusive to Java. Despite the fact that I believe Java is a good language (and perhaps the one I have been holding out for instead of going with C++), I want to know exactly what concepts can't work with any other language, and what concepts can. I believe they all can work with other languages, and that the issue really comes down to developers using what exists today that best solves their problems. My interest in development personally is not so much developing an application, but developing frameworks within which applications can be done. And I'm more interested in the smaller scale (which is apparently not where Java and/or what comes with it today) shines best (confirmed by so many references to enterprise class applications being far too difficult in anything else).

      --
      now we need to go OSS in diesel cars
    22. Re:what is it that Tomcat 4.0 lets me do ... ? by Skapare · · Score: 2

      A good introduction to the concepts behind template engines can be found at Servlets.com, along with its followup article.

      I'd like to take a look at these documents. Unfortunately the site has been down since yesterday. Do you know when it might be back or where a mirror would be?

      --
      now we need to go OSS in diesel cars
    23. Re:what is it that Tomcat 4.0 lets me do ... ? by angel'o'sphere · · Score: 1

      Just in case you read up your old posts.

      I do not want to talk you down, as you imply above.

      I want to point out: Tomcat is JAVA only.
      No perl, ok?

      Servlets is JAVA only, no perl/C++/C CGI or what ever, ok?

      If you like to mix that stuff use Apache and install Tomcat as addon for Appache.

      You are free to choose whcih ever language you like, no one tries to convince you "JAVA is the way".

      But all here, especialy *I * liekd to pioint out that your discussion is 90% off topic.

      All waht you say is basicly right, but in no way related to Tomcat.

      Tomcat is:
      written in JAVA
      used to launch JAVA servlets
      based on SUN specs -> J2EE, HAVA 2 Enterprise Edition
      especialy on the servlet API

      Servlets:
      are JAVA classes
      require a JAVA VM as runtime environment
      an easy way to create dynamic content *using* JAVA

      If you do not like to dig into JAVA, then simply stop talking in this thread ...

      I for instance have never used CGI, nor perl for webpages, nor PHP.

      (I program in C++, JAVA and perl partly since 12 years(C++) and 10 years(perl))

      I can not tell you WHY to choose Tomcat, no one can tell you why!

      I tried to explain to you "WHAT TOMCAT IS", and you are insulting me I would talk down to you ....

      If have the time to write everything a Servlet Engine based on J2EE and JAVA gives you in lets say, perl, then do it.

      Regards,
      angelo'o'sphere

      P.S. my email is my email, you can mail me and ask simple questions which are easyer to answer than the long posts of you.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  43. JSPs can use server-side Javascript by alienmole · · Score: 2
    JSP can support server-side Javascript. Two JSP servers that support this are Resin and JRun.

    We actually find it quite useful to get around some of the problems with Java embedded in web pages.

  44. Apache vs. the world... by spike666 · · Score: 1

    The Apache group releases yet another world class product...
    i'm glad to see that the Jakarta Project's latest release of Tomcat comes with more documentation and administrative tools than the earlier 3.x releases. Not that those were hard to install and configure, but when you're trying to get Management to let you use a product, it helps to have more warm fuzzy ways of doing things, than the old "well i can edit that config file and we'll be ready to go"

    of course there are still some documentation pieces lacking, (like whats the WARP protocol?!?) but overall it seems a really good, well rounded release of the Tomcat product.

    of course, i still havent found how i integrate tomcat into an existing web server other than Apache...

  45. Re:It's no use if you want to use it on your web s by Anonymous Coward · · Score: 0

    Uh, that's just the SDK.

    You want the JRE (Java Runtime Environment) for the purpose of deployment.

  46. Re:Why use PHP? Use Zope... by darekana · · Score: 1

    Probably the only application server you can have up and running in 2 minutes. Plus since its all python based, you can get tracebacks and debug the thing live. Lots of cool new method-specific caching features all built in. DAs for lots of different DBs, transactions etc. Solid community, BBSs, CMS, image galleries etc. Check it out! Ya might like it.

  47. What servlets are by TheInternet · · Score: 1

    And why do I need servlets?

    You don't need them per say. But a lot server-side applications are written as servlets.

    And is Java the only way to do servlets?

    Yes, but I don't think that really answers the question you're asking. A "servlet" is just the affectionate term for a server-side Java application. "Servlet" implies Java the same way "applet" does.

    Why not servlets in say, C or Perl or TCL or Lisp or whatever?

    You can write server-side applications in any of these languages, they're just not called servlets.

    - Scott

    --
    Scott Stevenson
    Tree House Ideas
    1. Re:What servlets are by Skapare · · Score: 2

      You don't need them per say. But a lot server-side applications are written as servlets.

      What is the advantage of doing a servlet? Just to be programming in Java?

      Yes, but I don't think that really answers the question you're asking. A "servlet" is just the affectionate term for a server-side Java application. "Servlet" implies Java the same way "applet" does.

      You can write server-side applications in any of these languages, they're just not called servlets.

      So what does Tomcat have to do with this? If I write in Java and compile it to a host machine executeable binary format instead of a class file, and run it under the CGI mechanism, would it still be called a servlet?

      --
      now we need to go OSS in diesel cars
    2. Re:What servlets are by TheInternet · · Score: 2

      What is the advantage of doing a servlet? Just to be programming in Java?

      A server-side Java application is called a servlet. It has no special status that I'm aware of.

      So what does Tomcat have to do with this?

      Tomcat provides you with a means to use servlets and JSP on your web site.

      If I write in Java and compile it to a host machine executeable binary format instead of a class file, and run it under the CGI mechanism, would it still be called a servlet?

      No, I don't believe so. I think they are only refered to as servlets if they exist as Java bytecode. But I'm not sure why you'd want to do what you describe here. :)

      - Scott

      --
      Scott Stevenson
      Tree House Ideas
    3. Re:What servlets are by Skapare · · Score: 2

      I think they are only refered to as servlets if they exist as Java bytecode. But I'm not sure why you'd want to do what you describe here. :)

      Actually my goal is more to do template logic elements as modules dynamically loaded and called in the same process, as briefly described here.

      --
      now we need to go OSS in diesel cars
    4. Re:What servlets are by rebelcool · · Score: 2
      So what does Tomcat have to do with this? If I write in Java and compile it to a host machine executeable binary format instead of a class file, and run it under the CGI mechanism, would it still be called a servlet?

      No. Nor would it run correctly. Servlets depend on several things exposed to them by the Servlet Container. Security sandbox, the ServletContext (a ton of config variables and methods useful for servlets) and other things. It is the servlet container which does the most basic processing of requests, then passing them on down to the servlet, usually. If you really want to know about it, buy a copy of Java Server Programming.

      --

      -

    5. Re:What servlets are by Skapare · · Score: 2

      Actually, I looked at 3 or 4 such books in a bookstore a couple months ago. My impression was that JSP was horrendously complex, and IMHO needlessly so. I felt all that configuration and detail pur performance at risk, as well as administrative sanity. JSP definitely does not follow the KISS principle. It seems to go out of its way to avoid it.

      You might want to explain the benefit of all those config variables, for I don't see it.

      --
      now we need to go OSS in diesel cars
    6. Re:What servlets are by rebelcool · · Score: 2
      horrendously complex to someone who doesnt bother learning it maybe... i find it simpler than ASP, really.

      Aside from standard CGI variables, theres logging methods, as well as it includes any custom config options you've specified in the configuration that only pertain to your servlet.

      Truly, if you havent bothered to try to learn it, dont bitch about it. That's just silly.

      --

      -

    7. Re:What servlets are by Skapare · · Score: 2

      FWIW, I found ASP to be horrendously complex, too.

      As far as learning it before bitching... you're misinterpreted what I'm doing. People say this stuff is specifically good and point to the whole thing, then say it is good because of one part of it. For example, the argument goes that one should do their web site in Java. But that suggests that all the benefit is from the Java language. What they really mean to say is that choosing Java and all that comes with it, including the API, JSP, and implementations like Tomcat and Velocity, are the benefit. What I'm trying to get pinned down is exactly what parts contribute what benefit, and identify what parts can be plugged in elsewhere. And also to pin down where the synergy between the parts exists. I want to determine, for example, if the Java language is better than the C++ language (or Perl, or PHP, or C) because of all that comes with it, as opposed to the language itself.

      BTW, the idea of requiring someone to learn everything before being eligible to criticize it (which I don't feel I'm doing, yet ... I'm really trying to isolate what could be of benefit even if it were separated from the other stuff) is a cop-out. Have you really learned C ... I mean really learned it, including all the APIs that everyone has developed to make it much more powerful than even K&R could imagine? Have you really learned all the Perl modules out there? And have you learned everything in all the Java APIs?

      What you're asking is not practical. No one can learn it all. And choices have to be made well before one has a chance to learn it. One has to choose what to learn and they have to determine what is best for them to make that choice wisely. I think that those who do learn all about one thing and understand it well should be able to explain it clearly to someone who has not learned it all, so that they may make the wise judgement whether it is something they ought to pursue learning. In my case, I want to know why all the environment that surrounds Java (not the language itself, or even its basic API) is something I should pursue. Someone telling me it worked out great for them is not telling me it will work out great for me.

      --
      now we need to go OSS in diesel cars
    8. Re:What servlets are by Degobah · · Score: 1

      Servlets offer the advantage over traditional CGI of being persistent, that is the servlet engine runs inside your webserver continuously waiting to handle requests. So you don't run into startup costs per request as you do with traditional CGI. This was the key advantage that servlets had originally over Perl/C/C++ but I think there are other alternatives now that do similar things in these other languages.

      However, once you buy into servlets and Java, many other things that you might want to do from your web application are wrapped up in a nice little package (DB API, threading, RMI/CORBA, etc). The servlet engine provides a framework for getting input parameters, cookies, etc. and allows chaining servlets to process different parts of the request. And a nice thing about servlets is that (ideally) you should be able to write your servlet application and run it on JRun or Tomcat or whatever engine works best for you with no modification of Java code.

    9. Re:What servlets are by Skapare · · Score: 2
      Servlets offer the advantage over traditional CGI of being persistent, that is the servlet engine runs inside your webserver continuously waiting to handle requests. So you don't run into startup costs per request as you do with traditional CGI. This was the key advantage that servlets had originally over Perl/C/C++ but I think there are other alternatives now that do similar things in these other languages.

      So the persistence is for the purpose of avoiding startup costs, as opposed to having session state ready without having to access a database? I'm a bit surprised that performance and cost are considered so important. But maybe they are thinking, or hoping, that Java will soon achieve C speeds. I know I'd like to have that, which is why I am looking forward to development in areas like GCJ that can let me compile directly to my host instruction set.

      Yeah, there was "FastCGI". I tried it, but found it to be too full of problems. Personally I'd rather use C for things that need a lot of CPU performance (for example generating images dynamically) or Java for complex logic that doesn't really demand a whole lot of CPU time. C for the grunt work and Java for the think work. Does that make sense?

      BTW, one of the things I'm considering doing in the design I'm working on is session persistence. That is, a process will persist for some time after each request, and when a new request comes in, the first thing the engine does is find the process for the session indicated by the cookie or wherever the session ID is passed, and pass the connection to it (perhaps to be implemented with named pipes and socket file descriptor passing). This process would then "resume" to handle the new request as a continuation of the session. The session state would still be in the variables that process holds. It would then save it's state somewhere at some time after the last request and could exit any time after that.

      --
      now we need to go OSS in diesel cars
  48. Re:It's no use if you want to use it on your web s by rajumd · · Score: 1

    The JRE has the same clause in its license, i.e., it is for development & testing only!

  49. Unicode support by juha0 · · Score: 1

    Finally this version seems to add some kind of Unicode support for HTTP requests. Lack of this before has been very strange, cause i18n has always been built in Java.

    1. Re:Unicode support by 21mhz · · Score: 1

      Now if only the browsers start actually using Unicode...

      --
      My exception safety is -fno-exceptions.
    2. Re:Unicode support by juha0 · · Score: 1

      Should have also pointed out that Tomcat 3.x was only capable of reading ISO-8859-1. Don't know about you, but all browsers that I use can send and recieve UTF-8, though they are too stupid to recognice which charset to use when showing text.

  50. JSP, Servlets, PHP, Tomcat, etc explained by TheInternet · · Score: 2

    So why can't I just compile my code after I write it, and run it that way?

    You can.

    And why do I have to mix code and content?

    This is a difficult question. You don't have to mix code and content. In fact you want to do so as little as possible. Here's what it comes down to:

    Many large scale web sites are a combination of front end UI written in HTML/CSS and backend database-driven functionality written in Java. Somehow you need to dynamically generate HTML based on database content and given critera. People figured out pretty fast that most web pages are sufficiently complex that embedding HTML/CSS directly in Java code (or a Perl/CGI script) is not a good solution. It makes the Java code difficult to read for the programmer, and it makes it very difficult for the designer to change the appearance of the site.

    Things like JSP and PHP attempt to head towards solving this. Rather than having all the HTML and Java code in one massive file, you have more template-like functionality. You initially create a HTML page as your template, then add dynamic elements using the scripting language. With JSP, the bulk of functionality is theoretically stored in other places, like JavaBeans. You then call this functionality with custom tags.

    This is not enforced, however. PHP and JSP are quite rich languages. If you design or maintain your JSP/PHP application poorly, you might find yourself back at square one: too much mixing of code and content. Except this time, too much code has creeped into the content, rather than the content creeping into the code. I must emphasize that it doesn't have to be this way. At least in the context of PHP, proper use of includes and objects should solve most major problems. But not everybody is that careful.

    Another (some would say more evolved) approach are the pure template languages like Velocity (for Java) and Smarty (for PHP). They do not have the rich language structure of raw PHP or JSP. They only provide the most basic ways to output data. They force you to put complex logic somewhere other than the HTML template.

    For the most demanding enterprise-class applications, you will need a full scale application server with load balancing, enterprise frameworks, and other high-end featurees. One such app server is WebObjects. There are many others.

    You're talking about some good things, but I'm still looking for why Tomcat is the only, or best, way to have this.

    It's definitely not the only one, and the best is certainly a matter of what you're trying to accomplish. There are a lot of options out there, and it's understandable that you might be a little overwhelmed.

    The first thing to do is determine what your needs are. A lot of people like PHP, and with good reason. It's fast, it's easy to learn, has a lot of very useful built-in functionality, and is open source. PHP can also interface with Java. However, it can be argued that PHP cannot provide the infrastructure and scalability that a pure Java solution can.

    If you decided to use Java, you have a mind-boggling number of options open to you. The options range from free/open source to very expensive. You have servlets, JSP, Velocity, Cocoon, XML, application servers and much more. Java has hooks into just about every aspect of server-side application development right now. To choose one as the best is impossible. It might make things to think of Java as the platform for all of these things.

    Tomcat, specifially, is a servlet/JSP engine. There are dozens of other such pieces of software. Tomcat tends to get more visibility because it is under the Apache banner.

    So when deciding what to use depends on these varibles, in addition to others:

    [1] Your timeline to complete your project
    [2] Your existing programming knowledge
    [3] Your budget/human resources
    [4] Sophistication of the site/application you need to build
    [5] Personal taste

    There is no one perfect solution for everyone, but some are more popular than others. In your case, you probably want to choose something with broad community support and lots of free documentation, sample code, third party books, etc. In my personal opinion, if you're just getting started with web development, and have absolutely no idea what you want, try PHP. It will probably get you up and running the quickest. It also has a tendency to teach you web development concepts without you realizing it.

    If you want to get more involved in web development as a career, you might also want to get a book that teaches you the Java language (ideally, with a focus on servlets). After that, you might have a clearer idea of what to tackle next.

    - Scott

    --
    Scott Stevenson
    Tree House Ideas
    1. Re:JSP, Servlets, PHP, Tomcat, etc explained by Skapare · · Score: 2

      Excellent description!

      So why not have a template engine that can take a tag and find the logic element as a dynamically loaded one-function library module (avoiding a fork), or as a class file, or as a binary executeable, or as a script, or as a static sub-document? The way I'm planing my design is that each document node in a document hierarchy would specify the search starting point. The name taken from the tag is the search target. If the node is a directory, the search is for a file within that directory. If the node is a file, the search is first for a file with the node name and tag name combined, and then for the tag name alone in that directory. The search will then extend through parent directories up to the document root. And then a list of alternate directories would be searched. The search stops when the named logic element is found. This would allow some logic to have scope over the whole site or a large branch of it, while some smaller areas can have the logic substituted with a variation just for that part. For example, you can create a single logic element to output the selected ad banner HTML and put that logic element in the document root. References to it by tags in documents anywhere in the site hierarchy would then use the one at the document root. One special branch can then include a different logic element to change the ad banner logic for that branch without changing the tags the presentation designer put in to specify where the ad banner falls into the page layout. Actually the documents would be searched the same way, too.

      I just don't want to force everything into a single language. I'm of the belief in using the right tool for the job, even if that means some parts of the site are done differently than other parts. I might do database logic in Java but dynamically generate graphical image files with C.

      --
      now we need to go OSS in diesel cars
  51. JSP == pointless complexity by CurlyG · · Score: 0, Flamebait

    Having once been dragged screaming from my cozy, fast and functional PHP nest and been forced into whipping some (very highly paid) Java programmers' woeful attempt at a web-based GUI that used Apache/Tomcat/Linux into some sort of shape, I can attest to the following facts:

    • Unless you actually have to talk to a massively complex "Enterprise" system, or leverage some other pre-written Java, JSP is the wrong solution in almost all cases.
    • JSPs are insanely difficult to debug. The smallest syntactical error, an inadvertant ommision of a quote or bracket, or basically any other error at all, results in 2 or more screenfuls of verbose, largely irrelevant error messages, somewhere in which is hidden the actual message relevant to the problem.
    • JSPs are the ultimate example of the "If all you have is a hammer, everything looks like a nail" school of programming.
    • Outside of my first point, there is basically nothing you can do with JSPs that you can't do with ASP, PHP, Embedded Perl, ColdFusion, etc., etc., all of which have the advantage that they were created from day one to spit out web pages. Mostly you can also do it faster, easier and cheaper, too.
    • Just because you happen to have a couple of hot-shot Java programmers handy doesn't mean they have any idea how to do, say, HTML, any more professionally than Joe Bloggs who's just done a 3-week "introduction to the internet" course at the local community center. Or web applications. Horses for courses, in other words.
    • Management types love JSPs because it's Java, and they've heard of that, and apparently it's really great!

    Admittedly the project I was strong-armed into was particularly ill-suited to JSPs, and I had no experience with Java, but it wasn't Java I had a problem with. I'm a web-app designer and I can do that largely irrespective of the language used.

    It's just that the idea of (in a software product) bumping the user's hardware requirements up by about 50%, and the application's total size up by about 100% just to use JSPs for the configuration interface really blew my mind.

    Please help stamp out this fucking stupid technology so noone else has to go through the sort of pain I did. (All for nothing as it turned out. 2 days after I'd finished rewriting the Java gurus' HTML code - a 3 month job since they were still writing more shit code as I was fixing what they'd already done - they whole project was canned and all staff layed off.)

    I decided to re-write the interface in PHP as personal exercise to fill in some of my now plentiful spare time. It took me one week, worked perfectly, and was considerably faster.

    --
    You know they call 'em fingers but I've never seen 'em fing. Oh, there they go.
  52. Some reasons to use PHP by TheInternet · · Score: 2, Informative

    but I'm curious as to why PHP is so popular when JSP provides a much more robust solution

    PHP is not a one-fits-all type of solution. It does not provide the same infrastructure that Java solutions do, and it is not a pure OO language. However, there are some good reasons to use it, depending on your situation:

    [1] Easier to learn than Java
    [2] Simpler to setup than many Java solutions
    [3] A great selection of extremely useful, easily accessible, built-in functions
    [4] Wide selection of books that don't assume you're already an experienced engineer

    The creators of PHP went to great lengths to remove as many of the needless annoyances of web development as possible. They provide a lot of ready made solutions to small, but annoying common problems. The language has bent itself to developer needs, rather than the other way around.

    PHP's creators realize that people just want the damn thing work, which is even evident in the installation instructions and documentation. This philopsophy, while starlingly rare in the open source world, is probably at the core of why PHP has such a devoted following.

    The strip_tags function is probably a good example of this. You give it a text string and it will remove all HTML tags contained therein. That's it. You can optionally tell it specific tags that you would like to leave in. This function is built into the language. PHP users love this. Many other languages would expect you to write a custom regex routine or go find some code somewhere to take care of it. Or you can start playing the module dependency game. These isn't the kind of stuff I want to do at 2am.

    - Scott

    --
    Scott Stevenson
    Tree House Ideas
  53. Re:It's no use if you want to use it on your web s by Westley · · Score: 2, Informative

    That's *one* licence it grants. The JRE *also* grants you the licence to use it in a normal way. This really isn't a problem - people have been distributing the JRE with their apps for ages.

    Jon

  54. I must be an idiot.. by LinuxHam · · Score: 1

    I've been trying to check out some of Apache's advanced offerings, but I can't get much beyond Jakarta. Specifically, I've wanted to check out Cocoon and Jetspeed.. to check out the free portal offerings before trying out my employer's offering, IBM Enterprise Information Portal.

    Jarkarta is easy to get running. I can get the sample servlets running in just a few minutes. Yet I've had the summer off, and have never gotten Cocoon to run once. The closest I've gotten was the famed "Internal Execution Error: servlet not initialized". I can tell you its extremely frustrating to think you have *finally* found the configuration error only to see the same result for a couple of months.

    Perhaps my problems stem from not having any Java experience to build from, so I'm not even sure how things like CLASSPATH work. Sometimes I've seen CLASSPATH include a directory like a normal PATH declaration, but then I've also seen CLASSPATH declarations include specific jar files. I've been able to get IBM's Xeena and the Alice chatbot to run under Java, but forget about these complex setups.

    I'm also never sure if the jar files from the twenty supporting packages you have to download and install before Cocoon or Jetspeed need to be copied to $JAVA_HOME/jre/lib/ext or just have variables like $ANT_HOME defined. Its a real daunting task for a true Java newbie. There doesn't seem to be a definitive word across the documentation on how these things should all be installed. In particular, there are some jar files that are either multiply downloaded (xerces and xalan come to mind) or don't exist anymore. Would someone at the project actually listen if I submit corrections to their documentation?

    I finally said "f-it for now" and I've moved on to PHP-Nuke. If its that hard to get started, I don't even want to know what it'll take to maintain or upgrade it. Plus I can run PHP-Nuke on Sourceforge. I didn't want to move on to IBM's Enterprise Information Portal until I had a free offering to compare it to, but if it's a matter of rpm -ivh or ./setup.ksh (IBM loves Korn Shell :) then the free offering will definitely fall way short.

    --
    Intelligent Life on Earth
  55. Why would you use the client hotspot anyways??? by Anonymous Coward · · Score: 0

    D/L Sun's Server Hotspot engine!

    It's characteristics make it slower on startup (wouldn't want those Windows users to have to wait for their Java gamelets to load now, would we?) But once it's running, you will see a significantly different performance heuristic.

    http://java.sun.com/products/hotspot/

  56. are you guys on crack? by mikemulvaney · · Score: 1

    1. Create WAR file
    2. cp WAR file to $TOMCAT_HOME/webapps

    done. You guys are having problems with this? Installing jserv was much harder -- you had to compile it, and then change the httpd.conf to work with it, and set up tomcat to listen to the right directories.

    Working with Tomcat 3.x is one of the most painless experiences I have ever had.... Except for when a JSP doesn't compile, it doesn't give you a very good message.

    -Mike

  57. sigh by mikemulvaney · · Score: 2, Insightful

    Yet another non-Java developer trashing JSP's.

    I'll agree with you -- for pounding out web pages, it is much easier to do it in perl or php. But if that's all you want, then even perl and php are overkill. Why not just write static HTML pages?

    JSP is useful when you need to talk to Java components to get real work done. If you are a web designer, then don't use it. But if you are working on a big project, then the web interface is probably the least important part of the whole thing. Java provides a much richer set of tools than perl or php for creating reusable business components, and JSP provides an easy way to stick a front end on top of that.

    JSP scales a lot better than PHP/perl for mulitple developers, too. It sounds like you are more of a web designer than a programmer. JSP might make you feel unconfortable, because you wouldn't get to program as much, but the lines of responsibility are more clearly drawn. The guys in charge of the business beans would make up tags for you to use, and you could work on making the screens look pretty in Dreamweaver.

    So what can you do with JSP that you can't do with PHP, Perl, ASP, etc? Talk to Java. That's what we want to do.

    If you want to talk to a perl module, then use mod_perl or HTML::Mason. If you have COM objects, then use ASP.

    JSP is just a front end! The decision has already been made, long ago, to go with Java for all of its obvious business programming advantages.

    -Mike

    1. Re:sigh by chtephan · · Score: 1

      You're right with this backend thing, but JSP is still overkill for the frontend. And not well suited. PHP gives you a lot of functions for interacting with the browser. Sure some JSP/Servlet implemtations offer you some help classes/methods, but... bah (I ported a complicated PHP frontend to JSP and it took me several days. Much more code than before, harder to understand, needed to search several third party libs).
      My favorite way:
      A classic java backend, a multithreaded CORBA server, exposing the interface via IDL files (Stuck with JDK1.3.0 because the JDK1.3.1 ORB is totally incompatible).
      PHP can communicate with this backend even when it's on another server, multiple servers, etc...

    2. Re:sigh by Stu+Charlton · · Score: 1

      Given the recent direction of JSP in the direction of tag libraries and Struts, I'd say that JSP is quite well suited for the front end if you have a big one.

      Define overkill? I have a frontend I'm creating that's well over 300 screens and 18 subsystems. I need maintainable screen flow and automatic form databinding. Will PHP really be more managable? Does PHP integrate with an object/relational mapping toolkit? Eventually I'll have to hook into Java for latter kinds of things, which implies I probably should be doing the whole project with J2EE to begin with.

      --
      -Stu
  58. A week? Seriously? by jslag · · Score: 1
    Although it has been about a year and my memory may be fading, I don't recall spending more than a day or two installing java on my company's old sun box, getting Tomcat running, and getting Apache to hand requests off to Tomcat.


    As to the ~username/file.jsp problem, I recall that you can map extensions (i.e. *.jsp) to tomcat. There was a tricky part if your jsps were in a different directory than your html files: you'd need to stick an empty file of the same name in the html directory, to let Apache know that it should try to return something. Someone out there has a better solution using mod_rewrite, but the empty .jsp files in html directories worked for my app.

  59. Simple problem, simple solution by Ars-Fartsica · · Score: 2
    Most web publishing problems are not terribly complex. Creating a solution in a simple language that provides good database connectivity makes a better fit than an overly complex solution.

    JSP has not exactly taken off like wildfire - the largish Java language, and the relative complexity of its runtime environment means JSP can never hope to catch PHP in terms of development and execution time for 99% of web publishing tasks.

    Use the right tool for the job.

  60. I hope it's much better than 3.x by qabi · · Score: 1

    I sincerely hope that it's better than Tomcat 3.x. We have worked with all versions between 3.2 and 3.2.3, and it's gotten better - but not great.

    There are still some concurrency issues under heavy load that makes it go belly up.

    Besides it's not excactly lightning fast. We've seen factors of 10-20 times the performance on other Servlet containers.

    Well, I guess that's what we've got innovation for!

    -dennis

  61. very nature of dynamic scripting languages? by brlewis · · Score: 2

    The problem is not the nature of dynamic scripting languages (which I take to mean languages that let you prototype quickly). The problem is design choices made in the particular languages you've looked at. BRL has no problem scaling to more complex applications. And if you choose to prototype quickly and end up with "dirty" code in pages, cleaning it out is a mindless process, as I described in another comment.

  62. URLs containing help on Tomcat by Paul+Bain · · Score: 1
    The best places for learning about Tomcat (both 3.x and 4.0), aside from the documentation, are mailing lists and forums, two of which are:

    (a) The mailing list tomcat-user-help@jakarta.apache.org, to which you can subscribe through the Jakarta site. The archives for this mailing list are helpful, too, and can be searched. In both the current mailing list and the archives, the most productive use of your time would be to read everything posted by Craig McClanahan and Pier Fumagalli, who are the primary developers (of Tomcat) and writers of most of the documentation. They seem to know more about Tomcat than anyone else (at least Tomcat 4.0), and they often post material to the mailing list that is not found anywhere in the official documentation.

    (b) The Tomcat FAQ forum and Tomcat FAQ at jGuru.com.

    In this vein, see an introductory article ("Server-side Java with Jakarta Tomcat") in Linux Journal (April, 2001) in the regular column, At the Forge.

    --

    A lawyer & digital forensics examiner. Also an expert on open source software (OSS).
  63. Re:JSP not that complex by Rich+Katz · · Score: 1

    Hello Curly,

    It sounds like you're awefully angry and I'm sure there are people who will agree with you, but I'm not one of them. You say:

    o "Anything you can do in JSP you can do in ASP and..."

    I simply don't agree. The JSP/Servlet layer enables you to build systems using both extensible MVC framework and patterns plus use and XML. ASP doesn't. No such software design has been provided in ASP. Now ASP will be supported by OO languages and Microsoft has the opportunity to use and incorporate patterns. However the people responsible for ASP have spent the past five years ignoring the only OO languages Microsoft had: Visual Foxpro and J++. So its anyones guess as to whether ideas like MVC, cohesion, and decoupling are on their agenda yet.

    o They are "insanely difficult to debug"

    Have you considered that you're possibly making erroneous assumptions about what JSPs are or how they work? This is easy to do. Many people think JSPs are just kind of some sugar coated HTML. In fact, the lack of coherence in language design of such scripting facilities kept me away from them for a long time.

    Also, I would think that your not being familiar with Java could make you seriously frustrated with JSP.

    One of my early takes on JSP was that it was a way to avoid writing Java. When you instead look at JSP as a time-saving facade for programmers who actually *do* know Java, it takes on a completely different meaning.

    o The hammer vs. nail thing and the "management loves it" thing.

    Been there done that. These are "everyone here's against what I want and they just don't understand" positions. The hammer/nail thing applies to any new solution - there are going to be people who advocate using the same solution for everything, large or small - because that's what they know about. And "Management" is a word used by people who unfortunately have bad managers. (See bad-managers.com "True stories of disasterous projects and cowboy managers").

    Both Hammer/nail and "management loves it" has be said about mainframes, about Microsoft and about Visual Basic.

    Most recently, I've even seen it about C++. And before that C. And both attitudes helped kill the companies that held them.

    Originally, although I was coming from a somewhat different place from you, I felt the same way about JSP - that it was designed to be "like" Microsoft's ASP and that was not the right approach. But now I think JSP has proved its worth. There are people who have been successful with JSP, have put a lot of time into it, and have benefited from it.

    I'm glad you are successful with PHP. But there also going to be many who will resent you for calling JSP a "f_____ stupid technology." I don't think it's worth swearing at or asking others to "stamp it out" for you.

    In fact, although I'm definitely not the worlds number one JSP advocate, I even resent your swearing and hostility at JSP and at Tomcat, since the fact that you put this in the Tomcat thread, and at all the people who have worked hard to make Tomcat work.

    So, if it was your intention suck someone in with your negativity and make them upset just because you're upset at people you had to work with - then congratulations. You've succeeded.

    My only advise is, express your feelings to them. Or let it go. Or both. There are too many good things to do and not enough time to do them to be stay hostile at a whole technology.

    I'm sorry that it didn't work for you, and I do know the feeling.

    Regards and best wishes,

    Rich Katz

  64. Re: Use PHP? Please.... by Rich+Katz · · Score: 1

    I don't see why you say the OSS community has some "mistrust of Java and Sun and anything related to them." This description seems both dismissive, and inflamatory. It depends on a somewhat exclusionary view of OSS - a view that I would categorize as "misguided" to say the least.

    I'm not saying you should or should not use PHP or advocate using PHP, but I think your statement about OSS could be a lot kinder.

    Tomcat itself is open source!

    Or do you not include Apache in your "open source definition?" And many products based on Tomcat are open source!

    Or don't they count because they aren't written in PHP? You've apparently dug some mental Grand Canyon between non-Java open source and Java-based open source so that one can be called OSS while and the other is called "mistrusted?"

    Regards,

    Rich Katz

  65. Where is mod_webapp and what is that warp-thing??? by Anonymous Coward · · Score: 0

    "Binary and source distributions of the mod_webapp connector will be posted on Wednesday, September 19, 2001"... Hm, well... Now it is already September 21, 2001... I would like to see tomcat-4.0 in action together with apache!

  66. Re:JSP not that complex by CurlyG · · Score: 1

    Howdy, Rich.

    I guess I was (in the job I was refering to) more frustrated than angry - I'm a pretty chilled-out soul all things considered.

    You raise some excellent points, and ones that I cannot disagree with. My problem is with the buzzword-laden promotion of this technology as the "one solution fits all" solution, which is an avenue that I'm sure you'd agree is a rocky garden path down which to lead any project (to mix a few metaphors just for the hell of it).Admittedly in the light of day my post was somewhat rabid, but if it helps stop one more company wasting ridiculous amounts of money and time, and indirectly screwing up an entire project's future (and let me a that this point say that this is *not* some Mom and Pop outfit we're talking about here) through sheer ignorance and force of advertising (of Java, by Sun), then I'll sleep easy despite my 0: flamebait rating for it.

    I am by no means denigrating Java. Yes it was a pain to learn (from a self-taught programmer's perspective who's given 2 weeks to learn the language and de-fuck-up the Javaissimo's shite HTML generating code), yes it was unsuited to the project, but ultimately the decision was made by the gulliable management (ok, no, I can't spell gulliable).

    Furthermore, we ended up using a hugely complex XML-based configuration interface which (*after* hiring the 2 Java gurus) it was decided would be needed to configure this fairly ordinary system.

    It was a chicken and egg situation. Once the Java guys were hired for the GUI, everything had to be centered around Java's requirements and abilities.

    In a parallel universe the GUI could have had it's back-end written in bash shell script and been just as compatible, functional, and probably faster. And written, leveraging the combined *nix experience of the devel team, in a week or two.

    Considering Java's requirements were approximately twice what our core application's were, this was distressing to anyone involved that had a sense of design or any pride in the quality of the product they were producing.

    It needs to be understood what Java is and isn't good for. That seems to me to be the key to making good technology decisions, and /. readers are people who are, or who soon will be, making those decisions.

    Anyway, I've enjoyed both the +1 posts on this, and it has been a heads-up, but I'll stick to my original pricipals of KISS, and say that unless one actually *needs* to leverage some specific Java capability, it's overhead outweighs it's benefits for web apps.
    Cheers, folks.

    --
    You know they call 'em fingers but I've never seen 'em fing. Oh, there they go.