eFix (APAR): pq51545
Status: eFix
For Release: WebSphere 4.0.1 (AE)
For Operating System: all
CMVC defect: 110598
Byte size of APAR: 867K
Date: 9/7/01
Abstract: sendRedirect not behaving according to specification.
Description/symptom of problem:
sendRedirect with a relative URL in WAS 4.0 always is relative
to the webapp context. This is different from how other similar
products handle it and is different from the upcoming Servlet
2.3 specification. A system property has been added to enable
WebSphere to behave according to the Servlet 2.3 specification
for sendRedirect.
Note: Behavior is the same whether using a jsp or servlet.
Example
=======
Without eFix installed or system property not set
WebApp Context: /webapp/examples/
jsp: myTest.jsp
===========================
response.sendRedirect("/sample.jsp");
URL will be redirected to http://localhost/webapp/examples/sample.jsp
With eFix installed and system property set
WebApp Context: /webapp/examples/
jsp: myTest.jsp
===========================
response.sendRedirect("/sample.jsp");
URL will be redirected to http://localhost/sample.jsp
NOTE: Relative URI's will not be affected by this code change.
NOTE: Relative URI's will not be affected by this code change.
Directions to apply efix:
1) Create temporary "efix" directory to store the zip/tar file:
AIX: /tmp/WebSphere/efix
Solaris/Linux: /tmp/WebSphere/efix
Windows: c:\temp\WebSphere\efix
2) Copy zip/tar file to the directory
3) Unzip/untar the file
4) Shutdown WebSphere
5) Run the jar file with the following command answering questions/prompts as they appear:
java -jar
6) Restart WebSphere
7) The temp directory may be removed but the zip/tar file should be saved. Do not remove
any files created and stored in the /WebSphere/AppServer/efix/pq51545 directories.
These files are required if an efix is to be removed.
Directions to remove an efix:
NOTE: EFIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED. DO NOT REMOVE AN EFIX UNLESS
ALL EFIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED. YOU MAY REAPPLY ANY REMOVED EFIX.
Example: If your system has efix1, efix2, and efix3 applied in that order and efix2 is to be
removed, efix3 must be removed first, efix2 removed, and efix3 re-applied.
1) Change directory to the efix location (/WebSphere/AppServer/efix/pq51545).
2) Shutdown WebSphere
3) Run the backup jar file with the following command:
java -jar
4) Restart WebSphere
5) To enable view the additional information provided below.
Directions to re-apply an efix:
Follow the instructions for applying an efix. If the backup files still exist (from the
previous efix application), you will be prompted to overwrite. Answer "yes" at the overwrite
prompts.
Additional Information:
------------------------------------------------------------------
To enable this efix...
AE:
1) Open Admin Console.
2) Select Application Servers.
3) Select JVM Settings
4) In the system properties add the following..
name=com.ibm.websphere.sendredirect.compliance value=1
5) Restart the Application Server.
About Trade Performance Application
-----------------------------------
This eFix modifies the behavior of the web container sendRedirect method. This change effects the Trade performance sample application. This will be fixed in an upcoming refresh of the Trade sample download for WebSphere version 4.02. Otherwise, the current Trade package can still be run after applying this e-fix by removing the JVM property com.ibm.websphere.sendredirect.compliance. This restores the original behaviour of sendRedirect in WebSphere 4.01