tags:

views:

382

answers:

3
+2  Q: 

Beginning J2EE

I know something about Java but completely new to Enterprise Java. I'm trying my hand with NetBeans 6.1 and GlassFish Application Server. Please guide me to some resources which tell me actually what java enterprise applications are, how they are different from normal java classes etc. Also which is best application server to use (on Linux)?

A: 

The Java EE 5 Tutorial - read online or as pdf

EJB 3 in Action - great book that covers everything you need to know

I have also recently started with Java EE and I have only used Glassfish/Sun Application Server so far, but from what I understad from my colleagues at work and what I have seen so far Glassfish seems to be the the best choice at the moment.

Kristian
A: 

Glassfish on Linux is an excellent choice.

+1  A: 

"what java enterprise applications are, how they are different from normal java classes etc"

Well they are normal classes. They are ran by an application server. The application server uses a class loader to load your servlet (any class that implements the HttpServlet interface). From there on it is your java code. I hope this gives you the kind of answer you want. Reading J2EE documents (even aimed towards developers) usually entails meaningless buzzwords.

I would recommend that you look over the J2EE Tutorial from Sun. It's free, and goes over the basics that you should know before moving onto a framework (Struts for example). And of course must need to know if you are just going to use just straight J2EE.

You may wish to familiarize yourself with some of this:

A couple of helpful facts:

  • A JSP is compiled into a servlet. These were created so that your Servlets wouldn't have to be developed using an Output Writer to handle every write to page content (the JSP will be compiled into that for you). ie: out.println("<html>etcetc...")
  • the request (HttpServletRequest) object represents the request.
  • the response (HttpServletRespone) object will build the response. (both the http headers and content).
  • Session and Context objects are also important. The former is for carrying session scoped objects (managed by the app server) and mapped to a jsessionid cookie on the client side (so it knows what client (ie: request) has what objects on the server side). The context object is used for initial settings.
  • You will want to go over web containers to fit it all together.
Zombies