Do you need help in finding the best teacher matching your requirements?
Post your requirement nowAsk a Question
Post a LessonAnswered on 30 Sep Learn IT Courses/Java/Servlet
Balmukund Tiwari
Experienced Maths & Physics Mentor with 5+ years, B Tech graduate.
Alternatives to JSP (view/templating layer):
Answered on 29 Sep Learn IT Courses/Java/Servlet
Balmukund Tiwari
Experienced Maths & Physics Mentor with 5+ years, B Tech graduate.
Servlets are the core of Java web development: a Java class that handles HTTP requests while the container (Tomcat, Jetty) manages the low-level plumbing. I'd use them directly for filters, file handling, or tiny services. Otherwise Spring MVC's DispatcherServlet already sits on top of them, so understanding servlets mainly helps with debugging.
JSP lets you write HTML with embedded Java instead of printing HTML from servlets. It suits server-rendered pages and older enterprise apps, but it's mostly legacy now. Thymeleaf or FreeMarker are better choices today.
REST is an architectural style (not a technology) that exposes resources over HTTP, usually as JSON, and stays stateless. It's the right fit when the frontend is separate (React, Angular, mobile) or when microservices need to talk to each other. It's easy to scale and works with any client.
Alternatives:
Answered on 30 Sep Learn IT Courses/Java/Servlet
Balmukund Tiwari
Experienced Maths & Physics Mentor with 5+ years, B Tech graduate.
Why banks use Java + servlets for netbanking:
Caveat: newer fintechs/neobanks use reactive stacks (WebFlux, Node.js, Go) for high-scale real-time needs — but traditional banks stick with servlets for stability + compliance, not raw performance.
read lessAnswered on 30 Sep Learn IT Courses/Java/Servlet
Balmukund Tiwari
Experienced Maths & Physics Mentor with 5+ years, B Tech graduate.
No. Servlets are the traditional foundation (Spring MVC, JAX-RS/Jersey, Struts all run inside a servlet container like Tomcat, using blocking thread-per-request).
But reactive/non-blocking frameworks skip servlets entirely, running on Netty instead: Spring WebFlux, Vert.x, Micronaut (Netty mode), Quarkus (reactive), Play. These use event-loop I/O for better concurrency at scale.
Servlet-based = traditional blocking stack. Non-servlet = reactive stack (Netty-based), used when you need high concurrency without a thread per request.
read lessAnswered on 23 Sep Learn IT Courses/Java/Servlet
Balmukund Tiwari
Experienced Maths & Physics Mentor with 5+ years, B Tech graduate.
Servlet = low-level Java mechanism that handles raw HTTP requests/responses (doGet, doPost, etc.) — general purpose, can output anything (HTML, JSON, etc.), can maintain session state.
RESTful web service = an architectural style for designing resource-based APIs — uses HTTP verbs (GET/POST/PUT/DELETE) mapped to CRUD, typically returns JSON, and should be stateless.
Nutshell :
Servlet = how requests are received;
REST = how your API should be designed/structured.
Ask a Question