Configuring JVM sendRedirect calls to use context root

If the com.ibm.websphere.sendredirect.compatibility property is not set and your application servlet code has statements such as sendRedirect("/home.html"), your Web browser might display messages such as Error 404: No target servlet configured for uri: /home.html.

About this task

Deprecated feature: The com.ibm.websphere.sendredirect.compatibility property is deprecated. You should modify your applications to redirect non-relative URLs (those starting with a "/") relative to the servlet container (web_server_root) instead of relative to the Web application context root.depfeat

To instruct the server to use the context root for that the application uses for sendRedirect() calls instead of using the document root for the Web server, configure the Java™ Virtual Machine (JVM) by setting the com.ibm.websphere.sendredirect.compatibility property to a true or false value.

Procedure

  1. Access the settings page for a property of the JVM.
    1. In the administrative console, click Servers > Server Types > Application servers.
    2. On the Application server page, click on the name of the server whose JVM settings you want to configure.
    3. On the settings page for the selected application server, in the Server Infrastructure section, click Java and process management > Process definition.
    4. Select Control .
    5. On the Process definition page, click Java virtual machine.
    6. On the Java virtual machine page, clickCustom Properties.
    7. On the Custom properties page, click New .
  2. On the settings page for a property, specify com.ibm.websphere.sendredirect.compatibility in the Name field, and either true or false in the Value field. Then click OK.
  3. Click Save on the console task bar.
  4. Stop the application server, and then restart the application server.



In this information ...


Related tasks

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 22, 2010 12:21:29 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-zos&topic=xrun_jvm_sendredirect
File name: xrun_jvm_sendredirect.html