Java Platform Enterprise Edition
lastmod 2018-08-17created 2014-03-114 edits
Java Platform, Enterprise Edition (Java EE) is a platform for server-side development with Java. On top of Java SE, the standard platform that runs on PCs, the Java EE platform adds Java software features that provide fault recovery and distributed multi-tier architecture running on web application servers, making it a platform for servers. It was previously called J2EE, but was renamed Java EE from version 5.0 onward.
Products implemented according to this Java EE specification are called web application servers, or WAS.
META_INF vs WEB-INF
META-INF is part of jar, Java's packaging technology. A jar basically has the same file format as zip, but defines additional conventions beyond zip, one of which is the META-INF directory and the format and purpose of some files in it. WEB-INF, on the other hand, is a directory created separately for web applications (by the servlet specification). The reason Spring configuration files are placed in META-INF is so the application can be packaged and deployed as a jar rather than a war. If you are building an application with a multi-tier structure and plan to package each tier separately, metadata for tiers unrelated to the web should go in META-INF, not WEB-INF.
Example
- [Recommended] Install Tomcat 8 to configure JAVA Application Server
// daytime.java
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.Calendar;
public class daytime extends HttpServlet {
public void doGet(HttpServletRequest request
,HttpServletResponse response)
throws IOException, ServletException{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
Calendar cal = Calendar.getInstance();
out.println("<html>\n<head>\n<title>DayTime</title>\n</head>\n<body>");
out.println("<div style=\"font-size: 40px; text-align: center; font-weight: bold\">");
out.println(cal.get(Calendar.YEAR) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" +
cal.get(Calendar.DATE) + " " + cal.get(Calendar.HOUR_OF_DAY) + ":" + cal.get(Calendar.MINUTE));
out.println("</div>\n</body>\n</html>");
}
}
Compile it as follows.
See also
Favorite site
- Wikipedia (en): description of JavaEE
- J2EE (Java 2 Platform, Enterprise Edition) specification
- Understanding J2EE
- What is J2EE?? Containers??
- Introduction to J2EE and EJB
- [http://docs.oracle.com/javaee/6/tutorial/doc/javaeetutorial6.pdf](http://docs.oracle.com/javaee/6/tutorial/doc/javaeetutorial6.pdf) The Java EE 6 Tutorial 1
- [Recommended] Getting Started with Java EE Applications
- [Recommended] J2EE (Java 2 Platform, Enterprise Edition) specification
References
-
Javaeetutorial6.pdf ↩