01.02.2013 Views

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

Publishing Reports to the Web - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

13.3.3 Deploying a JSP report <strong>to</strong> <strong>the</strong> <strong>Web</strong> and <strong>to</strong> Paper<br />

Deploying Your <strong>Reports</strong><br />

There are two ways you can deploy your JSP reports: through <strong>the</strong> existing <strong>Oracle</strong><br />

<strong>Reports</strong> application, or through a J2EE application you create yourself. Using an<br />

existing application is useful when you are developing and testing your JSP-based<br />

<strong>Web</strong> reports. When you are ready <strong>to</strong> deploy your reports, however, we recommend<br />

you use an application you’ve created yourself.<br />

About JSP reports with both paper and <strong>Web</strong> layouts<br />

With <strong>Reports</strong> Builder, you can create a JSP report with a paper layout, a <strong>Web</strong> layout, or<br />

both. You execute <strong>the</strong>se reports using different processes:<br />

■ JSP reports with paper layouts are executed via <strong>the</strong> <strong>Reports</strong> Engine<br />

■ JSP reports with <strong>Web</strong> layouts are executed via <strong>the</strong> J2EE container<br />

If your report depends on Java classes (e.g., Barcode classes, a <strong>Web</strong> Service stub, etc.),<br />

you must configure <strong>the</strong> process <strong>to</strong> access <strong>the</strong>se classes. That is, if your JSP report with a<br />

paper layout contains a Java class, you must set <strong>the</strong> classPath property of <strong>the</strong><br />

<strong>Reports</strong> engine element in <strong>the</strong> server configuration file (ORACLE_<br />

HOME\reports\conf\server_name.conf).<br />

If your JSP report with a <strong>Web</strong> layout contains a Java class, you can ei<strong>the</strong>r add <strong>the</strong><br />

classes or JAR <strong>to</strong> <strong>the</strong> WAR file, or change <strong>the</strong> J2EE container classpath. For more<br />

information, refer <strong>to</strong> <strong>the</strong> <strong>Oracle</strong> Application Server Containers for J2EE documentation.<br />

Note: For an example on building a report with a paper and <strong>Web</strong><br />

layout, refer <strong>to</strong> <strong>the</strong> "Building a Report with a Barcode" chapter in<br />

<strong>the</strong> <strong>Oracle</strong> <strong>Reports</strong> Building <strong>Reports</strong> manual. For a simple JSP-based<br />

<strong>Web</strong> report example, refer <strong>to</strong> <strong>the</strong> <strong>Oracle</strong> <strong>Reports</strong> Tu<strong>to</strong>rial.<br />

The steps in this section show you how <strong>to</strong> deploy a JSP report with a paper and <strong>Web</strong><br />

layout using a J2EE application. To deploy your JSP report with a paper and <strong>Web</strong><br />

layout, you can create a new <strong>Oracle</strong> <strong>Reports</strong> J2EE application in your <strong>Oracle</strong><br />

Application Server. You can create this application in a an existing instance or a new<br />

instance of <strong>Oracle</strong> Application Server Containers for J2EE (OC4J).<br />

13.3.3.1 Creating a New J2EE Application<br />

In this section, you will create a new J2EE application for <strong>Oracle</strong> <strong>Reports</strong>. You will<br />

create a <strong>Web</strong> application archive (a WAR file) that will contain <strong>the</strong> application<br />

information, <strong>the</strong>n deploy it as an Enterprise archive (an EAR file). To create a new J2EE<br />

application, you can use <strong>Oracle</strong> JDeveloper, ano<strong>the</strong>r Java development <strong>to</strong>ol, or you can<br />

create it manually. If you do not use <strong>Oracle</strong> JDeveloper <strong>to</strong> create <strong>the</strong> application, you<br />

will need <strong>to</strong> make a few modifications <strong>to</strong> <strong>the</strong> application, as well as <strong>to</strong> your JSP report.<br />

To create a J2EE application:<br />

Note: If you are not familiar with creating a J2EE application, refer<br />

<strong>to</strong> Sun’s <strong>Web</strong> site at,(http://java.sun.com/j2ee/). For more<br />

information on using <strong>Oracle</strong> JDeveloper, refer <strong>to</strong> <strong>the</strong> <strong>Oracle</strong><br />

JDeveloper Online Help.<br />

1. Before you create your WAR file, make sure your application contains all <strong>the</strong><br />

necessary direc<strong>to</strong>ries, such as WEB-INF and <strong>the</strong> web.xml file.<br />

Running Report Requests 13-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!