由 CAS 引起的 APEX 应用程序构建器的编码问题

Encoding problem with APEX app builder caused by CAS

我有一段时间使用 APEX 应用 builder/sql workshop 时遇到问题。存在编码问题(APEX 必须提供 EastEuropean 字符)。 最后我找到了问题的根源。我已经通过 web.xml(APEX 在 Tomcat/ORDS 上)将 CAS sso 实施到 APEX 中。没有 CAS 一切都很好,但我需要它。

下面是web.xml配置。


    <filter>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>
        <init-param>
            <param-name>casServerUrlPrefix</param-name>
            <param-value>**************</param-value>
        </init-param>
    </filter>
        <filter-mapping>
        <filter-name>CAS Single Sign Out Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>




    <listener>
        <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>
    </listener>

    <filter>
        <filter-name>CAS Authentication Filter</filter-name>
        <filter-class>org.jasig.cas.client.authentication.Saml11AuthenticationFilter</filter-class>

        <init-param>
            <param-name>casServerLoginUrl</param-name>
            <param-value>****************</param-value>
        </init-param>
        <init-param>
            <param-name>serverName</param-name>
            <param-value>***************</param-value>
        </init-param>
        </filter>

    <filter>
        <filter-name>CAS Validation Filter</filter-name>
        <filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class>

        <init-param>
            <param-name>casServerUrlPrefix</param-name>
            <param-value>****************</param-value>
        </init-param>
        <init-param>
            <param-name>serverName</param-name>
            <param-value>*************</param-value>
        </init-param>
        <init-param>
            <param-name>redirectAfterValidation</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>useSession</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>acceptAnyProxy</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>proxyReceptorUrl</param-name>
            <param-value>/apex/proxyUrl</param-value>
        </init-param>
        <init-param>
            <param-name>proxyCallbackUrl</param-name>
            <param-value>*************</param-value>
        </init-param>

        <init-param>
            <param-name>tolerance</param-name> 
            <param-value>12000</param-value> 
        </init-param> 
        <init-param>
            <param-name>authn_method</param-name>
            <param-value>mfa-duo</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>
    </filter>





    <filter-mapping>
        <filter-name>CAS Validation Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>CAS Authentication Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


我试图实现 https://github.com/apereo/java-cas-client/blob/master/README.md 中的一些东西 例如有一句话

The SingleSignOutFilter can affect character encoding. This becomes most obvious when used in conjunction with applications such as Atlassian Confluence. It's recommended you explicitly configure either the VT Character Encoding Filter or the Spring Character Encoding Filter with explicit encodings.

但是不知道怎么实现。当我尝试执行以下代码时,此过滤器无法正常启动,我无法检查错误日志。

    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>

    </filter>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

问题示例: SQL 工作坊>

select 'ł' from dual;

结果:A?

我该如何解决这个问题?

将 CharackerEncodingFilter 添加到 web.xml 是正确的。我找到了日志,我注意到缺少 类.

存在问题

需要将一些 .jar 添加到 WEB-INF/lib

  • org.springframework.beans
  • org.springframework.context
  • spring-网络
  • org.springframework.core

tomcat重启后一切正常