I do not have any knowledge of EJB, Struts, JBoss etc. Can I gain
these knowledge by reading books so I can match those java job
requirements?
Maybe, but there is a LOT to know, just in that short list -- in fact,
it's bigger than learning the Java language.
On the other hand, those of us who learned these technologies as they
were developing, learned them from books, trial-and-error, etc.
I suggest you install JBoss, and read Monson-Haefel's book and work
through his examples. EJB isn't really hard to learn, but it does
introduce some interesting constraints and must be approached a certain
way.
As for Struts (and Shale, and Spring), those things become easier to
digest after you've encountered the problems that they seek to address,
or when you are already designing in the same "framework space" where
these things live. Struts in particular, is really easy to work with
once you start using taglibs.
JBoss is a monster, but it's good. Better than certain very expensive
products it competes with. Well worth digging into and learning, if
you're going to be doing the kind of business software where it's used.
May I also suggest getting the Hibernate jars and a copy of MySQL, and
teaching yourself all about idiomatic data access?
If you came into my shop able to demonstrate competence, where you could
deploy an EJB, a Servlet, a JSP page that calls a custom Taglib,
describe an understanding of a few design patterns like MVC, configure a
database pool under JBoss, map a Hibernate descriptor to an object and a
table, and make JUnit insert, update, retreive, and remove that
persistent object, we would have no more technical questions for you.
If you can do all that, nobody cares if you learned it from a book.
That's where everyone else learned it, maybe with the occasional
day-long course here and there.
This is a lot of stuff to learn though. You should learn it because you
want to know it, not because you want to match your buzzwords to a job
description. We'd see right through that. J2EE is worth knowing, and
there's enough going on that you can expect to never know it all.