Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I start Java-based web development? [closed]

People also ask

How can Java be used in web development?

Java is a commonly used language for web development, especially on the server-side. Java web applications are distributed applications that run on the internet. Web development with Java allows us to create dynamic web pages where users can interact with the interface.

Can I build website using Java?

Java Web Application is used to create dynamic websites. Java provides support for web application through Servlets and JSPs. We can create a website with static HTML pages but when we want information to be dynamic, we need web application.

Is Java still used for web apps?

Java is the 5th most used programming language among developers worldwide as of 2021. Even with technologies like Python and Node. js, Java development services continue to grow.

Can Java be used for front end?

Using Java to develop an HTML front end is a great choice because, just as HTML provides a cross-platform way to deliver and lay out the content, Java servlets and JSPs allow programmers to write server-side logic that can be executed on any operating system in virtually any environment.


I would say:

  1. Install Java.
  2. Install Tomcat.
  3. Build a servlet, make it do stuff. Play with Requests and Responses. Get to grips with GET and POST requests, the HTTP protocol, why many web applications need RDBMSs, etc.
  4. If you get stuck on anything, use google, or this site to figure it out.
  5. Get your hands dirty!
  6. Get your hands dirty!

I had the same question and read this thread and started with Head First. Have read 5 chapters but then I started to search for new resources and found Core Servlets and JavaServer Pages (JSP) from http://pdf.coreservlets.com/ and I think this book is much better in many ways.

  • First of all it is not objected to an exam.
  • Includes much more example with codes.
  • There is many ways to implement a web application in Java. You can use just Servlets, just JSPs or combinations with/without beans etc. This book explains advantages and disadvantages of each very well.
  • Explains MVC from scratch much better. (chapter 15)
  • And it is free.

Update after almost seven years: I highly recommend to take a look at Spark Framework.


Use the first few lessons from the Spring step-by-step tutorial: http://static.springsource.org/docs/Spring-MVC-step-by-step/

Although the latter lessons are cover advanced Spring functionality the first couple of lessons are about setting up a simple, Tomcat-based web-app.


Be a bit careful. Most solutions to doing web development have a tendency to be very large and hard to get around and learn.

I would suggest getting the basics right since you WILL eventually need to know them. The Head First series are well written and a good start.

This will teach you JSP's and servlets which is what most of the frameworks build on top of.


Just start with your project with the book of your choice by your side. Lots of resources about good books can be found here on stackoverflow.

My advice is to start with making a page to communicate with the server, at least post some data and act depending on the response. At the beginning stick with base scriplets, don't go straight to jsf tag libraries (or whatever else of that kind), understand what is a session, a request, a response and so on.