You can preview a JSP-based Web report by clicking
in the toolbar, or by choosing Program
Run
Web Layout, to run the Web Source. Reports Builder displays Web reports
in your default browser.
If Netscape 7.0 is your default browser, and the browser does not display,
set the registry key HKEY_CURRENT_USERS\Software\Oracle\Toolkit\Tkbrowser
to the default browser location. Ensure that the BrowserName
and the BrowserPath
keys reflect the correct values. For example:
BrowserName=Netscape 7
; BrowserPath=C:\Program Files\Netscape\Netscape\Netscp.exe
.
If Run to Web Layout fails with an error related to the major.minor
version, you will need to update the environment variables CLASSPATH
or REPORTS_CLASSPATH
, as follows: remove the 9.0.x
ORACLE_HOME
specification in the oc4j.jar
file path (the oc4j.jar
file path should specify only the 10g
Release 2 (10.1.2) ORACLE_HOME
).
You do not need to have the Reports Server configured to use this functionality. Reports Builder includes an embedded Oracle Container for Java (OC4J) server. Each instance of Reports Builder has its own OC4J server listening on a unique port, so you can have multiple Reports Builder sessions running at the same time. If a port is not specified, Reports Builder automatically looks for a free port in the default range. If you are using the OC4J option to preview a JSP report locally and your JSP depends on external files, such as images, or if you want to check the generated Java files, it is important to understand how Reports Builder handles the temporary files.
A JSP gets converted into a .java
file and compiled into a class
file. When the class file is executed, it will return HTML in a .html
file. This file and the .java
and .class
files are
all located in the $REPORTS_TMP/docroot
directory. $REPORTS_TMP
can be passed in as a command line parameter to Reports Builder, thus allowing
you to override the default location for the docroot directory. The contents
of the docroot
directory are cleaned up when you exit Reports Builder.
Document Root
By default, the Reports Builder document root is the docroot
directory
under the directory specified by the $REPORTS_TMP
environment variable (for example, c:/temp/docroot
). The end user can
override this default docroot
from the command line (using the
WEBSERVER_DOCROOT
command line keyword). If your JSP depends on external files, such as images,
style sheets, and so on, make sure you copy them into the docroot
directory. Better yet, you can specify the WEBSERVER_DOCROOT
command line value to be your document root directory.
Document Root Structure
A JSP gets translated into a .java
file and compiled into a .class
file. When the .class
file is executed, it will return HTML in
a.html
file. When the .class
file is executed, it
will return HTML in an .html
file. This file and the .java
and .class
files are all located in the $REPORTS_TMP/docroot
directory. $REPORTS_TMP
can be passed in as a command line parameter to Reports Builder, thus allowing
you to override the default location for the docroot
directory.
The contents of the docroot
directory are cleaned up when you exit
the Reports Builder.
The docroot
directory structure looks as follows after running
emp.jsp
(note that we use the default docroot
which
is $REPORTS_TMP/docroot
):
temp
docroot
3000 working directory for instance of the Builder
default
defaultWebApp temporary JSP working directory
temp
_pages
_empxxx.class compiled Java class
_empxxx.java translated Java file
log OC4J log directory
global-application.log
server.log
orion-conf OC4J configuration files directory
stderr.log debug log when WEBSERVER_LOG=yes
stdout.log
3002 another instance's working directory
css template style sheets
images template images
WEB-INF
lib
reports_tld.jar
web.xml
rwerror.jsp template error JSP
empxxx.jsp working copy of emp.jsp
empxxx.html resulting output
Notes:
The large numbers in generated filenames are simply unique IDs, and have
no particular meaning (for example, emp012345678.jsp
).
The temporary files created in the docroot directory get cleaned up when you exit Reports Builder.
Displaying report output in your Web browser
Printing a report from your Web browser
Copyright © 1984, 2005, Oracle. All rights reserved.