spring整合blazeds flex请求后后台报:Channel endpoint my-amf received request.
页面无结果。
web.xml<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- spring -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/spring/applicationContext*.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> <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>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/others/log4j.properties
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener> <!-- struts2拦截器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>
struts-default.xml,struts-plugin.xml,/com/housoo/config/struts/struts.xml
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping> <!--Tomcat defaultServlet
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/messagebroker/amf</url-pattern>
</servlet-mapping> -->
<!-- Flex -->
<!-- Listeners -->
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<!-- -blazeDs Config -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener> <!-- spring MVC -->
<servlet>
<servlet-name>spring3</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/spring/spring-mvc.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup> </servlet> <servlet-mapping>
<servlet-name>spring3</servlet-name>
<url-pattern>*.controller</url-pattern>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>
com.opensymphony.oscache.web.filter.CacheFilter
</filter-class>
<init-param>
<param-name>time</param-name>
<param-value>3600</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>session</param-value>
</init-param>
</filter> <filter-mapping> <filter-name>CacheFilter</filter-name>
<url-pattern>/jsp/cache/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file />
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/jsp/error404.jsp</location>
</error-page>
<login-config>
<auth-method>BASIC</auth-method>
</login-config></web-app>
页面无结果。
web.xml<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- spring -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/spring/applicationContext*.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener> <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>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/others/log4j.properties
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener> <!-- struts2拦截器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>
struts-default.xml,struts-plugin.xml,/com/housoo/config/struts/struts.xml
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping> <!--Tomcat defaultServlet
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/messagebroker/amf</url-pattern>
</servlet-mapping> -->
<!-- Flex -->
<!-- Listeners -->
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<!-- -blazeDs Config -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener> <!-- spring MVC -->
<servlet>
<servlet-name>spring3</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/com/housoo/config/spring/spring-mvc.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup> </servlet> <servlet-mapping>
<servlet-name>spring3</servlet-name>
<url-pattern>*.controller</url-pattern>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>
com.opensymphony.oscache.web.filter.CacheFilter
</filter-class>
<init-param>
<param-name>time</param-name>
<param-value>3600</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>session</param-value>
</init-param>
</filter> <filter-mapping> <filter-name>CacheFilter</filter-name>
<url-pattern>/jsp/cache/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file />
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/jsp/error404.jsp</location>
</error-page>
<login-config>
<auth-method>BASIC</auth-method>
</login-config></web-app>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>
struts-default.xml,struts-plugin.xml,/com/housoo/config/struts/struts.xml
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>既然用了spring为什么还要配置struts2的监听器
<web-app> <display-name>NoteBook</display-name>
<description>BlazeDS Application</description> <context-param>
<param-name>flex.class.path</param-name>
<param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
</context-param> <!-- Http Flex Session attribute and binding listener support -->
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener> <!-- MessageBroker Servlet -->
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet> <servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/messagebroker/*</url-pattern>
</servlet-mapping> <welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list> <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>