Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Java Server Pages: Why or why not for web development?

Do you use it? Why or why not JSP over other options?



5:08 pm on Aug 22, 2002 (gmt 0)

10+ Year Member


I'm wondering about JSP for web development.

Do you use it? Why or why not?

I'm especially wondering about how choosing JSP over other web dev
technologies affects how much traffic a server can handle when it's
serving up JSP created static and dynamic web pages in contrast to, say PHP or Perl created pages.

I'm also wondering about development time using JSP over say PHP to
-- for instance -- develop a 1000 page website having half static and half dynamic content.

Moreover, in what situations is it more approapriate to use JSP for a site,and in what situations is it more appropriate to use something else such as PHP or Perl?

Thank you very much for sharing!


jeremy goodrich

6:13 pm on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member jeremy_goodrich is a WebmasterWorld Top Contributor of All Time 10+ Year Member

From my limited understanding of JSP, it needs weblogic as a web server to run.

For perl / php, you only need apache, or IIS - JSP would require an apache module, which then calls the web logic to handle the jsp.

If my understanding is correct, I have no idea why people would use JSP - makes more sense to me to stick with perl :) but then, I don't really code much.


8:59 pm on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

JSP certainly does not require Weblogic. It does require a Java application server (middleware) such as Tomcat [jakarta.apache.org] (by the Apache project) or Caucho Resin [caucho.com] since, after all, JSP is a Java application. Also see Sun's JSP home page [java.sun.com].

I have limited experience with JSP. It has the advantage that it is written in Java, so you can directly access EJBs and use them for complex application logic, and it is platform independent. You can code directly in Java in JSP pages. We selected JSP 1.2 for one major project because it was faster, more stable, and more secure than PHP, and because we are on a Solaris box and have no intent to move to Microsoft and ASP.

However, on this particular project, we also had a core team of Java programmers for whom the learning curve was very short. You can teach an HTML hack to write in ColdFusion in a couple of days, and a bit longer for ASP and PHP, but the only ones who could get much out of JSP 1.2 were those with a programming background with at least some familiarity with Java (perhaps that has changed now with JSP 2.0, but I wouldn't know).

It may be a bit much for the users of this board, which seem to be mostly from smaller and garage concerns.

jeremy goodrich

9:03 pm on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member jeremy_goodrich is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Ah, thanks for clearing that up - I guess I misinterpreted what the guys here told me when they explained how JSP works.

he he - btw, I'm not in a garage, and there are a huge variety of folks here, Jason :) - trust me, the variety of backgrounds we have here is very large, indeed.


9:10 pm on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Sorry, that wasn't directed to you or anyone else specifically :), and I didn't mean small in a pejorative sense. I consult for a medium-sized corporation (under $1b but over $100m in revenue) but also have independent contracts with a few small clients out of my bedroom-- I'm too poor to have a garage :).


9:11 pm on Aug 22, 2002 (gmt 0)

10+ Year Member

Hi Choster,

Thanks for sharing your experiences! In your post, you mentioned you
found JSP to be faster and more stable and secure than PHP in at least
one project.

My question is, if one were to aquire the needed skillsets for using
JSP -- and if it's faster, more stable and secure than PHP, why not use it
instead of PHP? What advantage besides skillset needs does PHP or Perl
offer over a JSP infrastructure for web sites -- small or large?

Thanks a bunch for sharing!

Take care and absolute best wishes,



9:21 pm on Aug 22, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Exactly. One of my clients uses JSP on Tomcat/Apache - and that's only possible for them because they have the IT resources to do it.

I will say that one staff Java wizard there in particular can get the site to do some amazing things. It's a complex development, with many different levels of security that get different dynamic pages and so on, plus a public section aiming for 50,000 pages - that's where I came on board as a developer, having been a member for several years.

On my last business trip I spent some days with the IT team there, looking over their shoulders and so on. Not for the faint of heart, I'd say. And not for the average web development.

But if I were going into a big development which required connecting many databases (even over heterogeneous OS's), generating pages on the fly with the results, tracking potentionally millions of users, and so forth -- then JSP is a strong direction to look at.


4:38 am on Aug 23, 2002 (gmt 0)

10+ Year Member

For JSP solutions, you really need the technical resources behind it to get it working properly. JSP itself is a monster. Actually, it is not, but you will usually involve J2EE, EJB and other enterprise level stuffs. Knowing Java (and J2EE) is a requirement, and there is just too much trouble to set up the environment if you just want to develop some small websites. And maybe we should not talk about the complexity of deploying a J2EE application...

Talking about speed and stability, you might find JSP solution actually run *significantly* slower in your average desktop development environment. Personally I find PHP much faster, and even Perl on CGI is faster than JSP, when all you got is an Intel box with 256Mb of RAM. The stability of JSP is also questionable, but it all depends on the application, the containers, how you deploy it, etc.

I will only consider using Java/JSP if you are developing something more than just web pages. The methodology is very different. With Java, you will start from coding an application server, and then wrap a webpage interface around it using JSP. With PHP/ASP, you will start with some website prototype in HTML, and hack it (putting PHP/ASP tags) until it works...


4:55 am on Aug 23, 2002 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I've been starting to use JSP at work, and I find it to be a bear compared to ASP. But I never knew Java, so the learning curve for me is enormous.

From what I've seen so far, JSP is far more robust than anything else available, but as everyone above has been saying, that robustness comes with a very high price tag.

Dreamweaver Ultradev and MX can write basic JSP pages for you, but these are really just simple database access pages. The real meat and potatoes of JSP comes when you start using beans, tag libraries, and XML/SOAP. It's just amazing what can be done.


4:45 pm on Aug 23, 2002 (gmt 0)

10+ Year Member

I use JSP for the site I work on, I suppose primarily because I covered Java programming at college at college so the learning curve was not too steep for me, horses for courses as they say. I've now built pretty much the same site in ASP and JSP for different companies (direct competitors). For me the JSP approach was both quicker and easier, but this is no doubt because of my background. I had to learn VB and ASP from scratch and found the syntax strange.

As regards the speed issue, in my limited experience theres not much in it for these two almost identical (from a backend code point of view) sites, but the JSP/Apache/linux/MySQL site seems to run slightly faster than the ASP/win2k/IIS5/SQL server 7 one. The machines are reasonably comparable. I didn't do any serious bench tests though, so its pretty subjective I suppose. These sites arn't anything major, just straight catalog database stuff.

A couple of things I'd like to say:

Java is a heavy duty language, but it doesn't have to be a nightmare to work with and there's lots of help and components you can use out there.

The only situation where you really need to use EJB's and the full J2EE spec (IMHO) is if you're implementing load balancing accross multiple servers. JSP by itself can by definition use any of the core and extended java API's, so you really have pretty much everything you'll ever need (assuming you know something about the other java APIs of course). Developers love to get into EJB because its good for their career and its 'cool' but most of the time its not really necessary.

If you're starting from scratch, PHP or ASP will probably get you up and running quicker.

If you're not running your own server, you'll find it much easier to find hosts that support PHP and ASP than support JSP. They are out there though.

You don't need to code your own application server, thats what Tomcat is.

If you look into JSP, I'd recommend having a look at something called taglibs. This is a way of building in pre-compiled java components into your JSP pages without actually having to write any java code yourself. There are readymade taglib libraries out there for just about anything you would want to do on an average website.

A new(ish) standard taglib specification has been produced which may help. Heres some interesting stuff about it:


Also have a look at the Jakarta struts project, this can make life very easy for you:


I beleive you come from a programming background louis? If so, JSP shouldn't hold any terrors at all for you. If you have an understanding of Object Oriented methodology then the rest can follow fairly freely (assuming you enjoy it I suppose).

If you have a go at JSP, feel free to sticky me if theres anything you want to know. I'm no expert, but I love to chat JSP. It can be a little lonely being a Java programmer at webmasterworld :-)


10:30 pm on Aug 23, 2002 (gmt 0)

10+ Year Member

Thanks, everyone! Your sharing has been quite helpful. Thank you!

Ppg, yes, I do have a programming background. However, it's all procedural,
not object oriented. From this thread, I take it I have to learn Java and OO
to do JSP. They just started using JSP and Weblogic/iPlanet/J2EE at work for a new project that's going
to grow and likely go on for years. That's why I was asking about JSP. It would
likley be a year or two before an opening would come up for me at work.
FWIW, I still do COBOL on the mainframe at a large organization.

For personal use outside of work, it seems the PHP or Perl route would
be the way to go. But if I skill up to try for a work assignment, it would be have to be JSP.

Trying to decide whether to allocate my study time to JSP rather than PHP or Perl.
Maybe I'll be able to squeeze in both over time. So much to learn....so little time!

Was especially wondering if one would be missing out not setting up a dedicated server to use Java
tools like JSP rather than PHP or Perl as far as performance and robustness is concerned.

Thanks again everyone -- and absolute best wishes!



7:49 am on Aug 24, 2002 (gmt 0)

10+ Year Member

Was especially wondering if one would be missing out not setting up a dedicated server to use Java
tools like JSP rather than PHP or Perl as far as performance and robustness is concerned.

From a performance point of view I doubt if you would be missing out at all by using PHP, seems to me that if there were any problems with PHP's performance it would'nt be near as popular as it is.

From a robustness point of view, I'm not qualified to comment having never used PHP, but I would have thought that the above comment holds true there too. Perhaps some of the PHP gurus here could comment.

IF you've got one - two years before an opening would come up, thats plenty of time to get up to speed with JSP studying part time, but for your affiliate projects you probably would be better off with PHP.

So much to learn....so little time!

I feel your pain Louis :)

I really want to learn PHP and the .NET framework, but havn't had time to look at either!

Another great JSP resource I forgot to mention, a book this time, 'JAVASERVER Pages' by Hans Bergsten (O'reilly) - 2nd edition. Absolutely superb introductory text, and the author is active on Sun's JSP interest mailing list. He's also a very nice bloke.

Hope this helps


12:28 pm on Aug 24, 2002 (gmt 0)

10+ Year Member

Hi Ppg,

What you so kindly shared sure does help - a whole lot! Thank you very much for sharing the above info. I very much appreciate it.

Based on the above, I'll focus on PHP first for affiliate sites, then JSP down the road for work. Thanks for the book reference, too! I love good books on a topic I study.

Take care and absolute best wishes,



Featured Threads

Hot Threads This Week

Hot Threads This Month