一尘不染

CAS导致APEX应用构建器的编码问题

tomcat

我有一段时间与APEX应用程式建立器/
sql工作坊有问题。有一个编码问题(APEX必须提供东欧字符)。最后,我找到了问题的根源。我已经通过web.xml在APEX中实现了CAS
sso(APEX在Tomcat / ORDS上)。没有CAS,evrything可以正常工作,但是我需要它。

下面是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实现一些东西 ,例如有一个句子

SingleSignOutFilter可能会影响字符编码。当与Atlassian
Confluence等应用程序结合使用时,这一点最为明显。建议您使用显式编码对VT字符编码过滤器或Spring字符编码过滤器进行显式配置。

但是我不知道如何实现它。当我尝试实现以下代码时,此过滤器无法正常启动,并且无法检查错误日志。

    <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 Workshop>

select 'ł' from dual;

结果:A?

我怎样才能解决这个问题?


阅读 247

收藏
2020-06-16

共1个答案

一尘不染

将CharackerEncodingFilter添加到web.xml是正确的。我找到了日志,并发现缺少类存在问题。

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

Tomcat重启后一切正常

2020-06-16