What is a Java EE web application?

I want to ask a question about java web application. When I start learning JSPs, I always hear about the Java EE web application. But I do not know the meaning of the word. Can someone explain this word to me? Thanks.

+6
java-ee
source share
3 answers

There is a hierarchy of Java distributions.

Starting with Java ME - micro edition for embedded applications on small machines such as phones.

Switching to JavaSE, which is the standard edition, most programmers are familiar with.

Then go to J2EE - enterprise Edition. In addition to SE, the J2EE distribution must support several enterprise level libraries and APIs in the javax series ..... The most important of these are transaction container APIs, EJBs and WS *.

These interfaces are associated with open source third parties such as GlassFish and JBOSS, but mainly through proprietary (end-to-end costly) products such as WebLogic or WebSphere.

+2
source share

A web application is different from other types of applications, such as desktop applications (for example, Photoshop), since most of the calculations are performed on a remote computer, and only the display data is sent to the user computer. Usually the user interface will be written in the form of "web technology" - HTML / JavaScript / flash, etc., And it will be viewed using a web browser, hence the name.

For this to work, the remote computer (server) must start an application that listens for client requests, performs some calculations, and returns a response to the user. For example, when you buy a book from Amazon, the purchase button sends a request to the remote application to process your order and returns a confirmation message.

There are many details in this process - the application should listen for requests, it should handle failures, possibly connect to the database and much more. Since most of this work is similar to any web application, an application server is usually used to use this work.

An application server is an application that knows how to run other applications and execute some of them. So, now when the user sends the request to the web application, the application server receives it, possibly extracts some data from it and checks it, and then tells your application to process the business logic. This way, you donโ€™t have to worry about things like communication when you write a web application.

There are web servers for all kinds of technologies. For example, IIS is the web server for .Net web applications.

Java EE is actually a set of specifications (which is a fancy word for a bunch of interfaces and orders, how to implement them) that define how you should write your Java application and how the provider should implement its application server so that they can work together. The โ€œcontainerโ€ mentioned here is the Java EE name for the provider application server.

You said you learn to write JSP. When you write JSPs, you are actually implementing a specification that defines how to write a Java EE mapping component that can be translated into HTML. Your application server (Tomcat / JBoss / BEA independently) knows what to do with your JSP to create the HTML you want and then send it to the user.

+4
source share

A web application refers to a certain type of โ€œmoduleโ€ that can be deployed in an EE container, such as Tomcat, WebLogic, or GlassFish. This is a collection of JSP, JSF, and other classes.

Unlike a regular Java application, an EE web application cannot simply be "started" by typing "java". It must be deployed to your web server. Once the server is running, you can take advantage of many built-in functions that, although useful, can be very similar to drinking from the acronym firehose.

Unfortunately, there is no easy way to get into it. From what I hear, the best way to start is with Sun's tutorials. There are also several books there. The most important concept is the idea of โ€‹โ€‹a "container" in which your EE application will run. It is like a virtual machine in a virtual machine. This is a strange concept.

Happy hunt! Jeff

+1
source share

All Articles