title: Redirect context root in Weblogic
body: <p>I have Spring Boot application which I deploy to Weblogic container.</p>
  
  <p>After it is deployed, I can access it using <a href="http://localhost:7001/my-application/" rel="nofollow noreferrer">http://localhost:7001/my-application/</a></p>
  
  <p>When I use <a href="http://localhost:7001/my-application" rel="nofollow noreferrer">http://localhost:7001/my-application</a> - without trailing slash at the end, I'd like to redirect it to <a href="http://localhost:7001/my-application/" rel="nofollow noreferrer">http://localhost:7001/my-application/</a></p>
  
  <p>I know that Tomcat already has such feature as there is a flag you can change:</p>
  
  <pre><code>/**
  * Whether requests to the context root should be redirected by appending a / to
  * the path.
  */
  private Boolean redirectContextRoot;
  </code></pre>
  
  <p>Is there any similar setting in Weblogic?</p>
  
  <p>EDIT:
  Adding weblogic.xml:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
          http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd"&gt;
  
      &lt;container-descriptor&gt;
          &lt;prefer-web-inf-classes&gt;false&lt;/prefer-web-inf-classes&gt;
          &lt;prefer-application-packages&gt;
              &lt;package-name&gt;com.google.*&lt;/package-name&gt;
              &lt;package-name&gt;javax.persistence.*&lt;/package-name&gt;
              &lt;package-name&gt;javax.persistence.spi*&lt;/package-name&gt;
              &lt;package-name&gt;org.apache.commons.*&lt;/package-name&gt;
              &lt;package-name&gt;org.hibernate.*&lt;/package-name&gt;
              &lt;package-name&gt;org.hibernate.validator.*&lt;/package-name&gt;
              &lt;package-name&gt;org.joda.*&lt;/package-name&gt;
              &lt;package-name&gt;org.springframework.*&lt;/package-name&gt;
              &lt;package-name&gt;org.slf4j.*&lt;/package-name&gt;
              &lt;package-name&gt;ch.qos.logback.*&lt;/package-name&gt;
              &lt;package-name&gt;org.objectweb.asm.*&lt;/package-name&gt;
              &lt;package-name&gt;antlr.*&lt;/package-name&gt;
              &lt;package-name&gt;javax.validation.*&lt;/package-name&gt;
              &lt;package-name&gt;javax.validation.spi*&lt;/package-name&gt;
              &lt;package-name&gt;javassist.*&lt;/package-name&gt;
          &lt;/prefer-application-packages&gt;
      &lt;/container-descriptor&gt;
  
      &lt;context-root&gt;/my-application&lt;/context-root&gt;
  
      &lt;charset-params&gt;
          &lt;input-charset&gt;
              &lt;resource-path&gt;*&lt;/resource-path&gt;
              &lt;java-charset-name&gt;UTF-8&lt;/java-charset-name&gt;
          &lt;/input-charset&gt;
      &lt;/charset-params&gt;
  
  &lt;/weblogic-web-app&gt;
  </code></pre>