tags:

views:

292

answers:

5

Is JSP part of the whole JEE/J2EE package? How are they related?

+1  A: 

From my understanding JSP is a part of the J2EE "family", providing a frontend or web-based access to Java applications.

canadiancreed
A: 

JEE is composed of web application, enterprise application and management/security components.

JSP (along with JavaServer Faces, Servlets, etc..) is a piece of JEEs' "Web Application Technology".

Further reading directly from Sun

Mark
+1  A: 

Java EE is a very big box. It includes:

  1. Servlets and JSPs for the web tier,
  2. EJBs - stateless and stateful session, entity, and message driven beans,
  3. RMI for Java-to-Java remoting (also part of Java SE),
  4. JDBC for relational database access (also part of Java SE),
  5. JMS for messaging,
  6. JTA for transaction monitoring,
  7. JNDI naming and directory services,
  8. Web services - SOAP, REST, RPC-XML,
  9. E-mail,
  10. Maybe others that I'm forgetting.

Plus containers that handle pooling, threading, lifecycle, etc.

As you can see, JSPs are just a small part of the larger whole.

You can accomplish a great deal with just a servlet/JSP engine (e.g., Tomcat or Jetty), servlets/JSPs, and JDBC. Any web app that exposes database CRUD via the web can be written with just these technologies.

duffymo
+1  A: 

J2EE is made up of many specifications. For example, J2EE 6.0 has spec links here: http://java.sun.com/javaee/technologies/javaee6.jsp

Some specifications can be implemented in non-J2EE containers, such as Tomcat webserver. So, they include jsps and servlets though they implement just a tiny bit of J2EE.

So, you can look at here for more about JSP. http://java.sun.com/products/jsp/

It is just a tiny part of the overall J2EE framework, but you don't have to use a J2EE container to use JSPs.

James Black
A: 

JSP has been part of JEE since the start, just after servlets came into being. JSPs are converted into java servlets (source code), then compiled into byte code before being used.

It would be interesting for you to take a look at the source code generated (if your container keeps the source).

A lot of frameworks use JSP as a basis for the 'view' part. JSF can uses Facelets instead of JSPs as a base.

Brian Silberbauer