Here's the deal: JSP pages get compiled into servlets, and have performance equivalent to servlets. They are faster than CGI, but so is molasses. They are NOT faster than mod_perl, and similar options like FastCGI. (Don't believe what the Resin guys say: their benchmark used slow perl code because they didn't know much about performance under mod_perl.) If you're using a database, the quality of the database drivers will have a large effect on the speed of your application. Last time I benchmarked it, DBD::Oracle seemed to be a little faster than Oracle's JDBC stuff, but not much and they may have improved it since then.

With the speed issue gone, you have two things to consider. The first is what it's like to use JSP. In my opinion, it's not so good. JSP uses embedded Java code, which is actually much worse than embedded Perl code because of all the casting and the difficulty of treating Java types generically. I think you'd be much better off with a good templating tool for Java, like FreeMarker, WebMacro, or Velocity. You can read more about why this might be a better choice in "The Problems with JSP". If you want to use a Perl tool that is similar to JSP in terms of embedding code in pages, you can read about the best perl options here.

The other thing you should consider is the experience that your team has. If you are mostly more experienced at Perl than Java, you will definitely write a better site quicker by using Perl. I personally find Perl to be more productive, but someone who had written as much Java as I've written Perl might disagree.

If you do decide to use JSP, do yourself a favor and at least get a decent tag library like the one that the Struts project provides. It basically turns JSP into a templating tool, which is a bit silly since the other templating tools are probably simpler and faster, but it does let you use something decent and put "JSP" on your resume.

In reply to Re: CGI (Perl) vs JSP by perrin
in thread CGI (Perl) vs JSP by Nomis52

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.