JSP The Reports URL Syntax

18-6 Publishing Reports to the Web with Oracle Reports Services 2. Ensure the directory on the application server where youve transferred the file is listed in the Reports Server access path. If it is not, use the REPORTS_PATH environment variable, or set the sourceDir property of the Reports engine element in the server configuration file.

18.3.2 Running a Report with a Paper Layout

Now that you have deployed your paper report, you can run it from a Web browser. In a browser, for example, you can type the following URL in the Location field: http:your_web_server:port_numreportsrwservlet?server=server_namereport= myreport.rdfuserid=usernamepasswordmy_dbdesformat=pdfdestype=cache In this example, your report displays in PDF format desformat=PDF in the browser. For more information on running a report from the browser, refer to Section 18.5, Specifying a Report Request from a Web Browser .

18.3.3 Deploying a JSP Report to the Web and to Paper

There are two ways you can deploy your JSP reports: through the existing Oracle Reports application, or through a Java EE application you create yourself. Using an existing application is useful when you are developing and testing your JSP-based Web reports. When you are ready to deploy your reports, however, we recommend you use an application you’ve created yourself. About JSP reports with both paper and Web layouts With Oracle Reports Builder, you can create a JSP report with a paper layout, a Web layout, or both. You execute these reports using different processes: ■ JSP reports with paper layouts are executed through the Oracle Reports engine. ■ JSP reports with Web layouts are executed through the Java EE container. If your report depends on Java classes for example, Barcode classes, a Web Service stub, and so on, you must configure the process to access these classes. That is, if your JSP report with a paper layout contains a Java class, you must set the classPath property of the engine element in the server configuration file ORACLE_ INSTANCEconfigReportsServerComponentserver_namerwserver.conf for Standalone servers and DOMAIN_HOMEconfigfmwconfigserversWLS_ Note: To transfer the file, you can use any method available, such as FTP or WebDAV. Note: The easiest way to deploy JSP reports is to copy them to the following directory: DOMAIN_HOME\servers\WLS_REPORTS\tmp\_WL_user\reports_release\dir_ name\war The procedure described in this section for building your own EAR file and deploying it is only indicative; it is not comprehensive. For the detailed procedure, see Oracle Fusion Middleware Deploying Applications to Oracle WebLogic Server. Running Report Requests 18-7 SERVER_NAMEapplicationsreports_ versionconfigurationrwserver.conf for In-process servers. If your JSP report with a Web layout contains a Java class, you can either add the classes or JAR to the WAR file, or change the Java EE container classpath. For more information, refer to the Oracle Containers for Java EE documentation. The steps in this section show you how to deploy a JSP report with a paper and Web layout using a Java EE application. To deploy your JSP report with a paper and Web layout, you can create a new Oracle Reports Java EE application. You can create this application in an existing instance or a new instance of Oracle WebLogic Server.

18.3.3.1 Creating a New Java EE Application

In this section, you will create a new Java EE application for Oracle Reports. You will create a Web application archive WAR file that will contain the application information, then deploy it as an Enterprise archive EAR file. To create a new Java EE application, you can use Oracle JDeveloper, another Java development tool, or you can create it manually. If you do not use Oracle JDeveloper to create the application, you must make a few modifications to the application, as well as to your JSP report. To create a Java EE application: 1. Before you create your EAR file, ensure that your application contains all the necessary directories, such as WEB-INF and the web.xml file. 2. Ensure that your JSP-based Web report points to the location of the JSP tag library for Oracle Reports. Otherwise, the report will not run. To point to the location of the JSP tag library, include the taglib directive in the JSP file: taglib uri=WEB-INFlibreports_tld.jar prefix=rw 3. Create a new EAR file, either manually or using a tool such as Oracle JDeveloper. Ensure you create the WAR file according to the appropriate Java EE format. Note: For an example on building a report with a paper and Web layout, see Building a Report with a Barcode in the Oracle Reports Building Reports manual. For a simple JSP-based Web report example, refer to the Oracle Reports Tutorial. Note: If you are not familiar with creating a Java EE application, refer to Sun Microsystems Web site http:java.sun.comjavaee . For more information on using Oracle JDeveloper, refer to the Oracle JDeveloper online Help. Note: The WEB-INF directory must contain the JSP tag library for Oracle Reports, called reports_tld.jar. In Oracle Fusion Middleware, you can find the tag library here: DOMAIN_HOMEserversWLS_REPORTStmp_WL_userreports_ versionrandom_stringwarWEB-INFlibreports_tld.jar