Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use JSP/Servlets?

I have done a lot of web development using PHP (both procedural and OO). I have in the last few years been involved in Java development (not JSP and Servlets) for embedded systems. I am pretty proficient using Java SE and have recently scored a nice web dev job. I am thinking of developing this site using JSP and Servlets but this is strictly for my own knowledge progression using Java. Is there any real reason to use JSP and Servlets over PHP or ASP etc?The problem being that a lot of Hosting companies do not offer e.g. Tomcat or other JSP servers and if they do, it's expensive.

Any feedback would be appreciated.

GF

like image 354
Grungefreak Avatar asked Feb 15 '10 22:02

Grungefreak


1 Answers

I've been using JSP for years and the extensibility generally makes the nominal cost for monthly hosting more than worth it. That said, if you need to put up a basic informational or resume type of page, you're probably not going to need JBoss or some other sledgehammer.

With JSP/Java, it opens the door to using Java in the controller layer (you probably already used or have heard about advanced connection pooling, distributed caching, scheduling via Quartz, Hibernate object/relational persistence). And then you can run Java on any machine with a JVM. The syntax on JSPs isn't incredibly difficult, though it does have a learning curve. As far as hosting, eatj.com has been pretty good so far.

On the PHP side, you can easily incorporate community features like Wordpress. While you can use nWordPress for Java, it's just not the same thing. Facebook, probably one of the biggest implementations of PHP out there, uses HipHop and decreased their processor requirements dramatically.

Your project may also also have an easier time getting staffed with PHP developers since they are relatively more easy to come by than JSP developers. I'd say learn JSP and/or Ruby - it opens up a few more doors and you may eventually prefer one method over another.

like image 129
vphilipnyc Avatar answered Oct 17 '22 10:10

vphilipnyc