Skip to Content

Allow encoded slashes in URL

I need to allow encoded slashes in the URL for my Java OData service. But by default this isn't allowed by the SCP. To fix the issue with an tomcat server you can do the following: https://stackoverflow.com/questions/39931538/how-set-allow-encoded-slash-in-tomcat8

Is there a similar solution for the SCP?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 11, 2017 at 10:14 AM

    I solved it by myself.

    You have to pass following JVM argument to the tomcat server:

    -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
    

    This can be done when you are updating your java application:

    Or when you are deploying your application via maven, than you can use following goal:

    <configuration>
        <vmArguments>-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true</vmArguments>
    </configuration>
    <goals>
        <goal>deploy</goal>
    </goals>
    
    Add comment
    10|10000 characters needed characters exceeded