Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Are Servlets/JSP obsolete?

 
Ranch Hand
Posts: 146
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?
 
author & internet detective
Posts: 40200
816
Eclipse IDE VI Editor Java
  • 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.)
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
Posts: 40200
816
Eclipse IDE VI Editor Java
  • 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: 146
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!!
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • 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.
 
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
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
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.
 
Bartender
Posts: 1197
22
  • 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.

 
Master Rancher
Posts: 4665
49
  • 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.
 
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
Master Rancher
Posts: 4665
49
  • 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.
 
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE 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 !!! :-)
 
You showed up just in time for the waffles! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic