Question: I am trying to start learning the `J2EE` part of `Java`. But I don't know where to start. I am familier with `Core Java` and mainly, I want to learn `JPA` and basics of `Hibernate` and `Spring Framework`. The main reason for this is I am working on a project which is using all these things. And most of the code is being developed by some senior guys and I have to make some modifications in that. So basically I need to understand their code. 

Can someone give me a sort of roadmap, like which things I need to know beforehand and in what sequence should I go? Any reference material, like links, books?

Answer: 
Whenever I want to learn a new framework/language, I usually whip up a small project that uses it. For a web framework, I have a common webapp that I write using it. It's simple and doesn't do much, but it has enough features that I need to take advantage of the more common parts of the framework (database, background jobs, mvc or whatever similar such). In fact, not long ago I took up the task of learning Spring/MVC+Hibernate. I don't know it all, certainly, but it gave me enough of a background that, when I don't know something, I know what questions to ask and how to ask them to get more information.

For web frameworks, I usually start with the simple "hello world" example provided for most frameworks. If it has a "guestbook" example (ie, to show database use), I follow up with that. From there, I just start adding the functionality I want in my learning application, beginning with the simplest. The idea being that I can figure out how to ask the right questions for the simple things. After I've done some simple things, I can then look at the more complex things and, with the information I've already learned, I can hopefully formulate the right questions to ask for them.

I recently started putting the [code for such learning projects on sourceforge](https://sourceforge.net/projects/rhs-galleries/), if you're interested.

*Edit: Donal's comment made we want to add... I didn't put the link in as an example for you to learn from. Rather, just as an example of me putting my code out there. If you want to really learn, you need to write the code yourself, not just read someone else's (in my opinion, at least)*
I recommend [Head First Servlets and JSP](http://rads.stackoverflow.com/amzn/click/0596516681). It's a great resource for learning about Enterprise Java.

This book was written for developers interested in passing the Sun Certified Web Component Developer (SCWCD) exam. Sun has since been acquired by Oracle and this exam has been replaced. More information can be found [here](http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=322).