Configure JVM sendRedirect calls to use context root

 

Overview

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. To instruct the server not to use the Web server's document root and to use instead the Web application's context root for sendRedirect() calls, configure the 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. Click Servers > Application Servers in the console navigation tree.

    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, under Server Infrastructure, click Java and Process Management > Process Definition.

    4. On the Process Definition page, click Java Virtual Machine.

    5. On the Java Virtual Machine page, click Custom Properties.

    6. On the Custom Properties page, click New.

  2. On the settings page for a property, specify a name of com.ibm.websphere.sendredirect.compatibility and either true or false for the value, then click OK.

  3. Click Save on the console task bar.

  4. Stop the application server and then restart the application server.


 

Related Tasks


Using the JVM