• Post Reply Bookmark Topic Watch Topic
  • New Topic

Are Servlets/JSP obsolete?

 
Billy Sclater
Ranch Hand
Posts: 145
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I've just bought the Bates & Sierra book 'Head First: JSP & Servlets', I'm working through the book and enjoying it!

In my workplace one coworker described JSP and Servlets as 'old school'.
Another agreed, but did concede that there is still a lot of call for these technologies in the industry.
He said that there are a lot of 'legacy' solutions out there using JSP and Servlets, so it is a technology worth knowing.

Hmm.. doesn't sound very reassuring! I want to learn web development, so what is your advice?

Should I go ahead and study Servlets & JSP? Or is there another technology you'd recommend?

Also, what's your opinion? Are Servlets & JSP really going the way of the dinosaurs?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35743
412
Eclipse IDE Java VI Editor
  • Likes 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not obsolete. Plus many technologies are built on top of them, so you still need to understand. Even new rich UI apps (where the entire UI is JavaScript) use MVC/Servlets to send data to the browser for the UI to use. Plus there are tons of apps that use both Servlets and JSPs for their front end that you could wind up working on.

Just make sure your book doesn't tell you to put Java code in a JSP. (I don't think this book does, but I haven't read it.)
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure that you are also as well-versed in HTML, CSS and especially JavaScript. Web developers who only know the server-side Java part are already behind the eight ball.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35743
412
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good point Bear! I only thought about the part of the question that was asked. Not the part that was important to ask,
 
Billy Sclater
Ranch Hand
Posts: 145
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that's good news!! And the 'Javascript in 24hours' book is next on my reading list!!
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Just make sure your book doesn't tell you to put Java code in a JSP. (I don't think this book does, but I haven't read it.)

The first part of the book does cover scriptlets, but then around chapter 8 says something to the effect of "now that you know how to do scripting, never, ever do it".

It's good advice. I still have to support pages with scriptlets but I never write new code using them. I have a project on my list where I'm going to have to modify a dozen or so scriptlet pages and I'm really, really dreading it. They are damn near impossible to debug. I'm debating whether it wouldn't just be easier to write the whole thing over again from scratch using MVC.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets/JSP can never becomes obsolete. As said, they are backbone/hidden players behind every good Java framework.
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So learning/knowledge of Servlets/JSP is essential and important part of Java web application development learning curve.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all Java web app frameworks use Servlets/JSP -- but most do. And regardless, the concepts are common enough that one should definitely know Servlets and JSP for any Java web work.
 
Rob Wehrstein
Ranch Hand
Posts: 40
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only major alternatives that come to mind are PHP and ASP.NET. ASP works fine with mod_mono on Linux, but hardly anyone is using it, which means the only major Linux alternative is PHP. PHP is very widespread, but at the moment, there are many more jobs for Java programmers than there are for either PHP programmers or .Net programmers.
 
Ryan McGuire
Ranch Hand
Posts: 1105
7
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Be sure that you are also as well-versed in HTML, CSS and especially JavaScript. Web developers who only know the server-side Java part are already behind the eight ball.


JavaScript and especially jQuery. I recently looked back through some of my own js code that I put together to handle DOM element positioning in a maintainable, browser-independent way and was filled with a mix of horror and amusement.

While you're looking at jQuery, you might want to look at jQuery mobile. Any website worth implementing is worth making responsive, or at the very least not mobile-hostile.

 
Dave Tolls
Ranch Hand
Posts: 2284
25
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Wehrstein wrote:The only major alternatives that come to mind are PHP and ASP.NET. ASP works fine with mod_mono on Linux, but hardly anyone is using it, which means the only major Linux alternative is PHP. PHP is very widespread, but at the moment, there are many more jobs for Java programmers than there are for either PHP programmers or .Net programmers.


As Bear says, there are non-Servlet Java frameworks.
"Play" comes to mind, mainly because it's what I'm currently using.
 
Sangel Kapoor
Ranch Hand
Posts: 162
1
Android Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was unaware that there are Frameworks that are not on Top of Servlets and Jsps.
Could you please tell us what PLAY uses inside ? And is that Better than Spring and Struts2 ?

 
Dave Tolls
Ranch Hand
Posts: 2284
25
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It uses its own thing.
It's not Struts or Spring.
It's its own server, built on Akka.

It's not without its problems...

Here's the 2.3 page.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sangel Kapoor wrote:I was unaware that there are Frameworks that are not on Top of Servlets and Jsps.
Could you please tell us what PLAY uses inside ? And is that Better than Spring and Struts2 ?



Play is a framework for building Web Applications using the MVC design pattern. The Play server is sort of an evented server (using event loops to serve incoming requests) unlike most of the Java EE servers which are thread based (usually one new thread per request). Play, since version 2 is modelled keeping RESTful principles in mind, which means it is completely stateless. There is no concept of service side session. If you have a code base in Scala and if you want to expose this via HTTP, Play fits nicely!
 
Sangel Kapoor
Ranch Hand
Posts: 162
1
Android Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Harry wrote:
Sangel Kapoor wrote:I was unaware that there are Frameworks that are not on Top of Servlets and Jsps.
Could you please tell us what PLAY uses inside ? And is that Better than Spring and Struts2 ?



Play is a framework for building Web Applications using the MVC design pattern. The Play server is sort of an evented server (using event loops to serve incoming requests) unlike most of the Java EE servers which are thread based (usually one new thread per request). Play, since version 2 is modelled keeping RESTful principles in mind, which means it is completely stateless. There is no concept of service side session. If you have a code base in Scala and if you want to expose this via HTTP, Play fits nicely!


Thanks a Bunch !!! :-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!