Release Notes for OracleJSP 1.1.2.4.0 ************************************* released with 9i production (9.2.0) Depricated Features & changes ================================ Oracle Servlet Engine (which ran inside the database) is desupported as of the 9.2 release. Therefore, running OJSP on OSE in the database is also depricated. You should run OJSP in the supplied JServ configuration which runs outside of the database. Documentation is now available on a separate cd. New features in release 1.1.2.X ============ - We now supply a batch file for loading demos into Oracle Servlet Engine running in the database. See makeit.bat in demo.zip (1.1.2.1) However, batch file is removed (as not applicable) in the 1.1.2.4 release. - JSP's can be loaded and published from a WebARchive (.war) file using the new Oracle WAR Deployment tool for the Oracle Servlet Engine. Removed (as not applicable) in the 1.1.2.4 release. Tips: ============ Good security practices: - In the JServ environment it is highly recommended that web access to generated _pages directory be denied. In the JServ configuration it is denied on the default _pages directory. However, if you are using aliases, be sure to deny access to any _pages directory generated under each alias directory. - In the JServ environment it is highly recommended that web access to globals.jsa, be denied. In the shipped JServ configuration is denied by default. - For applications using the db tags, consider using the dbSetParam tag to supply only parameter values rather than textual completion of the sql statement itself. This avoids SQL Poisoning, which is the possibility of users entering additional sql along with the expected value. - You can suppress the display of the physical file path when non-existent jsp files are requested by setting the debug_mode parameter to false. New features in release 1.1.1.X ============ - This release of OracleJSP supports the JSP 1.1 specification, including the tag extension mechanism for custom tags. - DESUPPORTED:OracleJSP translates and executes JSP pages in the 817 database using the embedded Oracle Servlet Engine (OSE). Refer to the OracleJSP Developer's Guide and Reference Release 8.1.7 for details. - A set of database access beans and SQL tags have been provided to facilitate database operations from JSPs. - Many code enhancements and bug fixes have been made since the last OracleJSP release (1.0.0.6.1). See the "Bugs fixed" section below. - This OracleJSP release has been tested in the following environments: - JDK 1.1.8 and 1.2.2 - DESUPPORTED: Oracle Servlet Engine in Oracle 817 database. - Apache Web server with JServ servlet engine (iAS), Solaris and NT. OracleJSP also works with the Tomcat server. Refer to the JSP Developer's Guide to see how to set up OracleJSP with Tomcat. - Note that with bug fix/enhancement 1155470 (see description below), a file named Foo.jsp will be translated into the file _Foo.java. This naming scheme for generated files is different from that in the OracleJSP 1.0.0.6.1 release, where it was translated into Foo.java. However, this change should not be directly visible to users, unless they are using the ojspc command-line translator tool (which was Beta in the 1.0.0.6.1 release). Known Issues and Restrictions in OracleJSP Release 1.1.X ============================================================ - Aliases and JSP [bug 2189308]. When using Apache/JServ's alias directives in combination with JSPs, there are issues when two aliases specify the same initial directory path. (The alias_translation initialization parameter must be true for aliases to work with JSPs.) If you have aliases such as the following: Alias /foo/bar1 "/path/to/my/dir/x/bar1" Alias /foo/bar2 "/path/to/my/dir/y/bar2" an initial request for /foo/bar1/bar1.jsp will work, but a subsequent request for /foo/bar2/bar2.jsp will incorrectly look in /path/to/my/dir/x for bar2.jsp, and will fail with a FileNotFound exception. This is due to a limitation with Apache/JServ's getRealPath() function, which does not return the correct information. There are two workarounds for this situation: 1) Have only one alias, with real directories under that: Alias /foo "/path/to/my/dir" and the bar1 and bar2 directories would both physically exist as /path/to/my/dir/bar1 and /path/to/my/dir/bar2. 2) Have more than one alias, but do not have common directory names: Alias /foo/bar1 "/path/to/my/dir/x_bar1" Alias /foo/bar2 "/path/to/my/dir/y_bar2" Note that the physical directories do not have the same name as the aliases. - [1644246] Changes made to SQL statements while developing .sqljsp's may require restarting the web server before they are seen due to SQLJ's statement caching. Workarounds are explained in the bug. - On NT, the ojspc translator tool does not support wildcards in file lists. Wildcards will work on Solaris (UNIX) shells, as the shell expands them. - The database access beans do not support any classes from oracle.jdbc2 package. This was made to be consistent with different JDK versions. - iAS 1.0.1 NT Release Note iAS 1.0.1 uses 8.1.6 libraries for SQLJ. However, OracleJSP 1.1 is designed to work with SQLJ 8.1.7. This creates a "no such method" error when dynamically compiling SQLJSPs (JSPs with SQLJ code in them). To work around this problem, you can use the 'sqljcmd' configuration parameter. The following line must be present in zone.properties: servlet.oracle.jsp.JspServlet.initArgs=sqljcmd=%ORACLE_HOME%\apache\jdk\bin\java.exe sqlj.tools.Sqlj Note the %ORACLE_HOME% needs to be substituted with the right value. The other alternative is to use the ojspc command-line translator to pre-compile SQLJSPs. - [1234581] IF PAGE VALUE NOT DEFINED IN JSP:INCLUDE, GET STRINGINDEXOUTOFBOUNDSEXCEPTION This error is caused by the following directive: java.lang.StringIndexOutOfBoundsException: String index out of range: Provide a non-empty string for the page attribute. - [1138828] GET JAVA.LANG.VERIFYERROR WHEN TRYING TO LOAD JSP PAGE This happens sporadically for a jsp page - after a while, the error goes away. The stack trace seems to point to the classloader: JspServlet: unable to dispatch to requested page:java.lang.VerifyError at java.lang.ClassLoader.resolveClass(ClassLoader.java) This problem has been traced to a bug in JDK 1.1.6 (JDK Bug Id: 4211181). The error does not happen with JDK 1.1.8 and higher. NOTE: jdk 1.1.6 is not supported with this release. ===================================================================== Bugs fixed since OracleJSP Release 1.1.2 (OTN bundle) ===================================================================== - [2060648] JAVAX.SERVLET.JSP.TAGEXT.TAGDATA.REQUEST_TIME_VALUE IS NOT USED javax.servlet.jsp.tagext.TagData.REQUEST_TIME_VALUE is not used to populate the TagData object (passed to TEI class), when some attributes are request-time attributes. Previous behavior: OJSP previously did not store attributes into TagData, if the attribute is a request time one. Fixed 1.1.2.4.0. - [1625788] JSPC IGNORES ADDCLASSPATH FOR BEANS IN JSP TO JAVA COMPILATION ojspc was not using the value in the -addclasspath option at translation time, so it was not able to translate JSP's with beans without putting the bean classes or jars in the system classpath. Fixed 1.1.2.1. - [1625520] JSPC DOES NOT USE INCLUDE CLASSES UNDER WEB-INF DIRECTORIES The command line translator, ojspc did not automatically pick up the classes and jars under the approot's WEB-INF/classes and /lib directories. Fixed 1.1.2.1. ===================================================================== Bugs fixed since OracleJSP Release 1.1.1.0 (OTN bundle) ===================================================================== - [1623802] JSP PARSE TAG SCRIPTLET GENERATES EXTRA FOR EACH LINE An extra line was generated in version 1.1.2.0 which caused the debugger to not match up with the correct line. Fixed in 1.1.2.1. - [1524452] EXCEPTION IN RUNTIME INCLUDE CAUSES STACK OVERFLOW IN JSP The testcase is not valid for JSP 1.0/1.1. It does an illegal forward in a jsp:included page. Because the output/writer has been obtained, when an error happens in a jsp:included page, the error page mechanism will try to catch the exception and forward to the request page. In Tomcat 3.1 this raises java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained. In OJSP, looping caused the stack overflow. It is still invalid to do this, but we now avoid the stack overflow. Fixed in 1.1.2. Also back ported 8.1.7.1 version. - [1517083] INDIVIDUAL FILE BASED APACHE ALIAS DOES NOT WORK WITH OJSP The workaround for this problem, i.e., setting alias_translation to false is no longer required. Fixed in 1.1.2. - [1501372] ORACLE JSP DEMO XMLQUERY CANNOT SET DB CONNECTION The database connection assumed the default connection and did not allow the user to set a specific connection. Logic was added to set connect string. Fixed in 1.1.2. - [1494417] FOR LOOP TAG (USING JML.TLD) DOES NOT WORK It just runs the loop only once. Fixed in 1.1.2. - [1492763] CONTENTTYPE GOT REVERTED TO THE DEFAULT CONTENT TYPE IN JSP:INCLUDE (APACHE) Using then response.setContentType("text/html; charset=UTF-8"); b.jsp is not using UTF-8. Fixed in 1.1.2. Note that users must set page directive in the included jsp file. - [1486735] OJSP IN APACHE/JSERV FAILS TO DIFFERENTIATE BETWEEN MULTIPLE VIRTUAL HOSTS mod_jserv caches the document root for the first URL processed and uses it for all consecutive requests, without checking if they are addressed to the same virtual host. Fixed in 1.1.2. ===================================================================== Bugs fixed since OracleJSP Release 1.1.0.0 (IAS 1.0.1, 1.0.2, Oracle 8.1.7.0) ===================================================================== [1480207] NULLPOINTEREXCEPTION HAPPENS WHEN A DIRECTIVE WITH NO ATTRIBUTE VALUE IS USED e.g.: <%@ page buffer %> Fixed in 1.1.1. [1416282] NLS PARAMETERS ARE NOT PASSED CORRECTLY WHEN USED IN JSP:INCLUDE There are two issues in this bug: (1) The NLS string was not encoded correctly in %HH format and was not passed correctly to b.jsp when a.jsp includes b.jsp (2) The RequestDispatcher emulation of OJSP on Apache/JServ is not affected by "translate_params". Both issues have been address in OJSP 1.1.1.0. However, the bug fix has not solved the case where a.jsp includes b.jsp which includes c.jsp with NLS parameters. [1409953] GETPARAMETER FAILS WHEN TRANSLATE_PARAMS=TRUE With multibyte data, translate_parms=true and a jsp included via an include action, for example, then a null point exception was thrown. Fixed in 1.1.1. Also backported to 8.1.7.1. [1395596] EXPECTING STATUS CODE 500 WHEN SERVER INTERNAL ERROR BUT GOT 200 OK Using response.sendError(...) would give the expected 500 error message, however, this function call in Tomcat does not support NLS. If we had a Japanese compilation error message and used sendError() message would not be encoded correctly because sendError resets the content type and char set. Also, sendError(int status, String msg) in Apache/JServ basically ignores the msg string. That means we cannot use it on Apache/JServ when OJSP is used in development. Therefore we have made the sendError call optional. It is controlled with a new parameter, send_error. If send_error is true, OSJP uses sendError() to send 500 status error code message. If false, it sends a message with 200 status code, but has National Language Support. Fixed in 1.1.1. [1391388] XSL TRANSFORM TAG DOES NOT WORK APACHE/JSERV WITH SSL The XSL demo works if SSL is not enabled. If SSL is enabled the following occurs: JSP Error Exception: javax.servlet.jsp.JspException: Error applying stylesheet style/hello.xsl The HTTP version of the demo works but the HTTPS version throws the above exception. This restriction comes from the mechanism of getting XSL stylesheet. When the tag is run on pre-2.1 servlet engine (e.g. Apache/JServ) If the tag is used on Apache/JServ with https protocol, then it will fail to retrieve the XSL process. If this tag must be used with https, code the whole URL in the path in href attribute. e.g. "http://host:port/path/your.xsl". This bug will automatically go away, when move to a post-2.1 servlet environment because, it will get the resource internally, not going through http / https. [1388175] OJSP ON APACHE/JSERV ON NT MISTOOK DIRECTORIES WITH CAPITAL LETTERS AS APP ROOT OJSP on Apache/JServ on NT mistook a directory with capital letters (e.g. "OnlineOrder_html") in it as application directory, even if there was no globals.jsa or alias setting. This caused trouble including and forwarding to other JSP files in other directories under the doc_root. Workaround was to use lowercase letters in the directory names. Fixed in 1.1.1. [1388000]PAGE RELATIVE URI DOES NOT WORK IN THE TAGLIB DIRECTIVE page relative uri does not work in the taglib directive. A page relative uri is a uri which does not start with "/"., e.g.: <%@ taglib uri="dir2/test.tld" prefix="foo" %> The page relative logic did not work for a taglib uri, but works for. Page relative include directives. Workaround: change the page relative path to the application relative path. e.g.: <%@ taglib uri="/dir1/dir2/test.tld" prefix="foo" %> Please note: for taglib directive, it is better to use app relative path, instead of page relative path. And, in JSP 1.2, there may be some new clarification on page relative path semantics in taglib directive. Fixed in 1.1.1. [1378388] OJSP SHOULD CALL GETWRITTER RATHER THAN GETOUTPUTSTREAM In Apache/JServ, this problem produces an IllegalStateException when the servlet later tries to call getWriter. Workaround is to use <% response.getWriter(); %> before any include directive in which you want to include a servlet. Fixed in 1.1.1. [1374091] OJSPC AND PUBLISHJSP DO NOT BEHAVE CORRECTLY WHEN PAGE HAS TWO CHARSETS A page should not contain two page directives with different character sets, but when it did, e.g. <%@ page contentType="text/html; charset=koi8-r" %> <%@ page contentType="text/html; charset=iso-8859-1" %> In ojspc this gave a NullPointerException and in publishJsp it gave an java.lang.OutOfMemoryError. It is not a problem in Apache/Jserv. It is fixed in 1.1.1. ============================================================================= Bugs fixed since OracleJSP Release 1.0.0.6.1 ============================================================================= [1358636] AND DO NOT WORK and did not work in OJSP, but their non-standard short forms and did. This has been fixed in OracleJSP 1.1.0 [1288730] ".." WON'T WORK IN ERRORPAGE / JSP:FORWARD / JSP:INCLUDE The following 'errorPage' directive did not work: <%@ page language="java" errorPage="../control/error.jsp" %> This has been fixed in OracleJSP 1.1.0. [1261458] JSP:FORWARD CANNOT FORWARD TO A HTML PAGE This is really a limitation of the Servlet 2.0 API in JServ, which has no RequestDispatcher interface. OracleJSP 1.1.0 works around this problem. [1250326] CARRIAGE RETURN AND LINEFEED CHARACTERS IN STATIC TEXT ARE MISSING IN SOME CASES In some cases, Carriage Return and Line Feed characters in static texts (e.g. html part) were missing in generated class. Fixed in OracleJSP 1.1.0. [1238238] OJSP CANNOT DYNAMICALLY INCLUDE AN HTML FILE Dynamic include commands would raise an exception on Apache/JServ: This is a limitation of the Servlet 2.0 API for dynamic includes and forwards (no RequestDispatcher interface). OracleJSP 1.1 works around this limitation. Fixed in 1.1.0. [1237578] OJSP FAILS TO LOCATE FILES WHEN IT IS INVOKED WITH SERVLET ALIAS IN APACHE Oracle JSP 1.0.0.6.1 failed to locate some files, when alias_translation was set to true (the default) and users used servlet alias to invoke the oracle jsp servlet. e.g., using servlet alias "orajsp" instead of the full class name "oracle.jsp.JspServlet". (The workaround was to either turn off the alias_translation or invoke the JSP servlet with the full name "oracle.jsp.JspServlet".) This problem has been fixed in OracleJSP 1.1.0. [1222788] ERROR MESSAGES DISPLAY MULTIBYTE CHARACTERS WITH "?" Oracle JSP failed to display multibyte characters on the error messages correctly. For example, I have the following line on my jsp: With XXX, YYY, ZZZ are multibyte characters. If this JSP fails for some reason on this line, the following was displayed: Exception: oracle.jsp.parse.JspParseException: Line # 10, name="???" property="???" value="" /> Error: Error in attribute list: ??? is not a defined bean. Fixed in OracleJSP 1.1.0. [1213897] SHORT IS NOT CASTED PROPERLY <%@ taglib uri="oracle.jsp.parse.OpenJspRegisterLib" prefix="jml" %> <%= shortBean.getShortValue() %> When a bean had a property with type defined as Short, JSP returned an error: Errors compiling: jml_setProperty3. Incompatible type for method. Can't convert short to java.lang.Short. Fixed in OracleJSP 1.1.0. [1213777] JML:USEFORM - PROBLEM IN CASTING <%@ taglib uri="oracle.jsp.parse.OpenJspRegisterLib" prefix="jml" %> Exception: oracle.jsp.provider.JspCompileException: Errors compiling:JML_useForm4.java Incompatible type for method. Can't convert java.lang.String to double. user.setValue( __paramVals[0]); at oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:167) Fixed in 1.1.0. [1207720] SUPPORT IMPORT LISTS THAT SPAN MULTIPLE LINES OracleJSP previously did not support breaking the list of imported packages across multiple lines, for example <%@ page import="package1" import="package2" import="package3" %> would fail. This syntax is now supported in OracleJSP 1.1.0. [1155470] JSP FILE NAME CAN NOT CONTAIN "-" (DASH) The JSP Specification 1.0 does not limit that jsp file name contains "-" (dash), which means a jsp file can be named as a-b.jsp. But this would cause compilation error in OracleJSP, because the jsp engine created a-b.java based upon a-b.jsp; In this java file, there is a public class called "a-b", this is an illegal name in java language, and cause the compilation error. Note: a html file can be named as a-b.html. Now, the default behavior of OracleJSP 1.1.0 is to encode the jsp filename into a legal Java identifier. e.g. for /public/dir1/a-b.jsp package name becomes: _public._dir1 class name becomes: _a_2d_b So, reserved keywords and illegal Java identifier characters in JSP file name will not create any problems in OracleJSP 1.1.0. ============================================================================= Bugs fixed since OracleJSP Release 1.0.0.6.0 ============================================================================ [1225531] JSP UNABLE TO SHARE SESSION WITH SERVLET [1230626] OJSP DOESN'T WORK FOR PAGES IN ROOT DIRECTORY OF ALIASED PATH [1233612] REQUEST.GETPATHTRANSLATED() RETURNS INCORRECT VALUES UNDER ALIASING [1235873] FAILURE IN JSP:INCLUDE WHEN APP RELATIVE AND PAGE RELATIVE USAGE MIX TOGETHER ============================================================================