Working With Web Applications; Hiding Jsp Source Code - Adobe 38000382 - Macromedia JRun - Mac Manual

Jrun sdk guide
Table of Contents

Advertisement

Working with web applications

This section describes how to work with web applications when building JRun installers
or embedding JRun as your application server.

Hiding JSP source code

When deploying JSP pages as part of a web application, you might not want to provide
your customers with the clear text version of those pages (the .jsp files). Instead, you can
distribute only the binary (.class) versions of those pages.
JRun compiles a JSP page to create the page's class file when the page is initially requested
by a client or when a requested JSP page was modified since its last request. However, in
a deployed application, you can bypass compilation to force JRun to always load the
page's class file.
You bypass the compilation of a JSP page for the following reasons:
Performance
your application.
Security
bypass JSP page compilation, you do not have to include the JSP pages that make up
the application; instead, you include only the corresponding class files that are in Java
bytecode.
Turning off JSP compilation
In an OEM environment, you might want to disable JSP compilation so that users
cannot change and then recompile JSPs. This is possible if they have the source code, but
it is also possible for them to reverse engineer the JSP pages or add their own
implementations in your application.
To disable dynamic JSP compilation:
In the jrun_root/servers/jrun_server/SERVER-INF/default-web.xml file, set the
JSPServlet
example shows:
...
<servlet>
<servlet-name>JSPServlet</servlet-name>
<servlet-class>jrun.jsp.JSPServlet</servlet-class>
<init-param>
</init-param>
</servlet>
...
Parameters set in the default-web.xml file apply to all applications running on that JRun
server. These changes take effect the next time you start the JRun server.
If you disable JSP compilation but your application includes JSPs, you must precompile
them using the instructions in the section,
34
Chapter 5 Embedding JRun
Compilation of static JSP pages initially adds processing overhead to
JSP pages are text files that can be read and edited by anyone. If you
translationDisabled
<param-name>translationDisabled</param-name>
<param-value>true</param-value>
initialization parameter to true, as the following
"Precompiling JSPs" on page
35.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Macromedia jrun 4

Table of Contents