When starting with Java web development, the first thing to learn is
Servlet API, it is the core of java web development, unless you understand this.. you can not effectively work on java web apps. Next thing to learn is JSP.
Its just like php, its based on Servlet API.
- Once you are comfortable with Servlet/JSP, learn a good MVC framework, I will recommend Spring MVC
- The next this is to learn an ORM tool, Hibernate/JPA.. however this is not absolutely required, you can you raw JDBC API as well.
- EJB isn't for just web development, its for middile tire, Once you learn above thing, you will have idea of what do I mean by 'middle tier'
- You do not need to learn Swing or Ruby on Rail, Swing is for desktop applications, not web apps, Ruby on rail is not java, its a totally different language/framework
- Here are some gud resource to start with
-
Servlet tutorials
-
JSP tutorials
-
Spring MVC Step by step