实现跨域时,配置 web.xml时提示:
CORSFilter is not a concrete class
CORSFilter is not assignable to 'javax,servlet.Filter'
是什么原因?
-----------------------------web.xml---------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<!--display-name 显示名称-->
<display-name>wechat-baggio</display-name>
<servlet>
<servlet-name>WxServlet</servlet-name>
<!--<servlet-class>boilerWeChat.servlet.WxServlet</servlet-class>-->
<servlet-class>boilerWeChat.servlet.WxServlet</servlet-class>
<!--自动启动-->
<load-on-startup>1</load-on-startup>
</servlet>
<!-- url-pattern中配置的/WxServlet用于指定该Servlet的访问路径 -->
<servlet-mapping>
<servlet-name>WxServlet</servlet-name>
<url-pattern>/WxServlet</url-pattern>
</servlet-mapping>
<!--<welcome-file-list>-->
<!--<welcome-file></welcome-file>-->
<!--</welcome-file-list>-->
**<filter>
<filter-name>CORSFilter</filter-name>
<filter-class>boilerWeChat.servlet.CORSFilter</filter-class>
/**这里提示错误:boilerWeChat.servlet.CORSFilter is not a concrete class;boilerWeChat.servlet.CORSFilteris not assignable to 'javax,servlet.Filter'**/
<init-param>
<param-name>charset</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CORSFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>**
</web-app>
吃鸡游戏
相关分类