Chapter 14. PRD Reports Embedded in Web Applications

At this stage, with the amount of knowledge we have of Pentaho Report Designer (PRD), we can confidently say we are fairly good PRD developers.

This chapter attempts at taking not only one step forward with PRD, but many.

Once this chapter is finished and the concepts presented here are understood, we will be able to create a web portal that allows users to access PRD reports, send parameters to them, and select the final presentation format.

We will also be able to perform every configuration needed to have the portal working as well as have it packaged so that we can transport it and deploy it in a different environment with little modification.

In this chapter we will do the following:

  • We will explain what Java Platform Enterprise Edition (JEE) is and its main components.
  • We will explain what Apache Tomcat is. We will download it, install it, configure it, and start it.
  • We will explain what Eclipse and Eclipse Web Tools Platform (WTP) are. We will download Eclipse, install it, set it up, and configure its perspectives.
  • By means of Eclipse, we will create a Dynamic Web type project and configure it.
  • We will create and configure an Apache Tomcat instance in our project.
  • We will create a JDBC/JNDI connection pool.
  • We will add to our project MySQL's JDBC driver as well as the required libraries and report we will be working on.
  • We will create and configure a Listener and a Servlet.
  • We will also create and configure a Web Client.
  • We will package our project and deploy it on Apache Tomcat.

Finally, we will invite you to perform every step needed to execute a report through Apache Tomcat.

Tools and technologies we will be using

Before starting with the practical part, we will present and discuss (summary-wise) the tools and technologies required to perform our practice.

Learning JEE

Java Platform Enterprise Edition (JEE) is the part of the Java platform that allows the execution of components based on application servers. JEE promotes the construction of modular software distributed over N layers and is defined by various specifications. Software providers must comply with a series of standards defined within the specifications so that their products obtain JEE compliance.

JEE covers an important amount of components and specifies how each of them is supposed to work. Some of the most popular components of this platform are as follows:

  • Servlets: These are software components that are executed on the server side, are oriented mostly to workflows and calculations, and are commonly used on web applications.
  • Java Server Pages (JSP): These are web components oriented to presenting information and generating content with which the final user will interact.
  • Enterprise Java Beans (EJB): These are components that specify how application servers should provide objects. EJB objects possess a series of features, such as security, the handling of transactions, concurrency control, remote communications, and so on.
  • Web Services (WS): These are components that allow the exposure of functionality via the web. They are commonly used on current applications.

One of JEE's most attractive features is the low cost with which one can begin to create applications. Many of the available implementations are free and open source software (FOSS) and have an excellent quality. There also exist a fair amount of FOSS developer tools with a quality that, in many cases, is superior to that of commercial versions.

JEE is also a technology stack with a maturity and robustness highly proved and thoroughly tested. A very important number of current applications are written in Java.

Learning Apache Tomcat

Apache Tomcat, also known as Jakarta Tomcat or simply Tomcat, is a multiplatform server that works as a servlets container. Tomcat implements Oracle's servlet and Java Server Pages specifications. It includes a compiler named Jasper that transforms JSP into servlets.

Tomcat is currently being used in environments of high concurrency and where high availability is required.

Tomcat can work as a standalone web server, is written in Java, and is distributed under an Apache 2.0 license.

Note

Tomcat is currently on Version 7, with support for Servlet 3.0, JSP 2.2, and Expression Language (EL) 2.2. For more information, please refer to the project's main page at http://tomcat.apache.org/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset