Spring Filter can't get in. I don't know why I can't get into the class.

web.xml

    <!--  -->
    <filter>
        <filter-name>ClientTokenFilter</filter-name>
        <filter-class>com.ustcinfo.bia.common.filter.ClientTokenFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>ClientTokenFilter</filter-name>
        <url-pattern>*.h5</url-pattern>
    </filter-mapping>
public class ClientTokenFilter implements Filter{
    @Override
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("");
        return;
    }

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void destroy() {
        // TODO Auto-generated method stub
        
    }
}

you can click from XML to the class by pressing ctrl. But I can"t get in at run time.

by the way, can the suffix be written as anything (here is .h5) and can be accessed as long as it matches? When
is called, it goes around directly and does not enter the filter for verification

        $.ajax({
            url:commonObj.domain+"/h5/insertOptLogRecord.h5",
            method:"POST",
            contentType : "application/json;charset=UTF-8",
            data:dataEncode,
            async:true,
            "success":function(optLogObj){
                window.parent.qtEntrance.PrintLog("-"+optContent+"-AJAX");
            },
            "error":function(XMLHttpRequest, textStatus, errorThrown){
                window.parent.qtEntrance.PrintLog("-"+optContent +"-AJAX");
                commonObj.saveInfo2Custom(dataEncode,"/h5/insertFaultCheck.h5");
            }
        });
Mar.05,2021
Menu