views:

453

answers:

9

I have been using java as my main language for 3 years while developing college assignments, and now I plan to learn the web programming aspect of it. I see there are lots of different "stuff" going on such as JSP, JSF, Spring, etc.

Previous topics suggest that Head First Servlets and JSP is a good book to start with, but what do you think about that? After that, what route I should be following in order, at least to be able to write my own blog site app from scratch?

+3  A: 

Web Development with Java Server Pages is a great book available cheaply on Amazon. Another good one is Core Servlets and JavaServer Pages (JSP).

snake
+4  A: 

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!
karim79
+1 got to crawl before you can walk. Definitely good idea to learn the basics before turning to a framework.
John Wagenleitner
A: 

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.

Alberto Zaccagni
+4  A: 

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.

Itay
+1 Java web development basically means Spring nowadays. I might suggest getting started with a basic servlet, then quickly moving on to Spring...
William Brendel
A: 

Check JavaPassion.com

It has an online course for java and other related technologies like ajax, jruby, webservices etc. And the coverage is pretty decent.

Hope this will be beneficial to you.

rajesh pillai
A: 

First it's important to understand the web languages, html, css, javascript. A good resource would be http://www.alistapart.com/

Then understand how http works, and how servlets are modeling http requests/response cycles. This is a good book: Head First Servlets and JSP.

Then try out the first java web framework that captures your attention. A good one is Spring Framework.

Good luck!

Mercer Traieste
A: 

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.

Thorbjørn Ravn Andersen
+1  A: 

I kinda had a similar route, although not because I was in college, but because my career of many years involved standalone application development using Java, with no web component involved. Java-based web development basically seemed to pass me by, and I didn't find it easy when I tried to move into the mainstream.

Recognize first that web-based development is a pretty large field. From an employment point of view, opportunities tend to drift towards one or other subsections of the field in general. Roughly speaking, front-end and back-end development tend to be viewed as specific enough skills that you might be expected to have expertise in one versus the other, more so now that JavaScript is more central to frontend development.

And the surfeit of frameworks in Java makes it difficult for the newcomer to choose what to begin out with. There's just way too many JavaScript libraries, Web frameworks and application servers or frameworks. Even though your background is in Java, I'd still suggest you try out Rails or maybe Grails to get a better idea of the entire stack, as they have a more coherent story. In Java, there's dominant libraries for sure, but you'll still find your efforts to master them interrupted by constant comparisons to other competing frameworks or so. Or GWT and Wicket, being more based on the Java development style, may mean an easier transition to web technologies. Spring framework is also a good starting point as it has a more or less consistent story from the back- to the front-end, although it is still overwhelming.

Sumit Kishore
A: 

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.
hrzafer