Flex项目与SSH项目整合问题
开发项目重用是很重要的开发手段,正直开发一个SSH项目,其中有一功能可重用之前的整个Flex项目(通过BlazeDS与java端交互,所需服务和servlet等有spring和springMVC来管控)。其实Flex项目同其他项目整合原理很简单,就相当于在其他项目中嵌入flash,不过此处还要考虑通过BlazeDS同java端通信的问题。
flex项目和SSH项目整合过程:
将Flex项目编译生成的swf文件盒相应的html文件以及相关联的样式文件等拷贝到SSH项目中,同时将flex项目所用java类和Spring配置文件放到了SSH对应目录下,并配置了文件。部分截图如下所示:
现象:
1.在flex项目中,编译swf文件时,如果不改变Properties文件中的相关配置:serverContextRoot="/Flex项目名" serverRootURL="http://localhost:8080//Flex项目名" ,直接使用编译好的swf文件进行整合,则前台提示send failed,控制台没有输出任何消息。该问题是没有找到BlazeDS通道的原因,提示见下图:
2.如果改变Properties 文件中的`相关配置:serverContextRoot="/ SSH项目名" serverRootURL="http://localhost:8080/ SSH项目名" ,直接使用编译好的swf文件进行整合。但根据配置文件存放位置不同,目前有两种现象:
1)将Flex所需配置文件放到上图中红色所示位置时,如下图所示配置时,
登录时,flex端提示:
控制台提示:
[BlazeDS]HttpFlexSession has not been registered as a listener in for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register FlexSession as a listener in .
[BlazeDS]Channel endpoint my-amf received request.
[BlazeDS]Channel endpoint my-amf received request.
[BlazeDS]Channel endpoint my-amf received request.
第二次点击登录时flex端提示:
控制台仅多了一条提示:
[BlazeDS]Channel endpoint my-amf received request.
2)当将Flex所需配置文件放到下图中红色所示位置时,
配置文件如下图所示配置时
登录时,flex端提示:
控制台提示:
[BlazeDS]HttpFlexSession has not been registered as a listener in for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register FlexSession as a listener in .
[BlazeDS]Channel endpoint my-amf received request.
[BlazeDS]Channel endpoint my-amf received request.
[BlazeDS]Channel endpoint my-amf received request.
第二次点击登录时同样是这个问题
本文仅简短的描述了整合过程极有可能遇到的问题现象,并没有实质性的解决这个问题,但上文能反应出两个问题,一个是Flex同java交互的通道问题,另一个是即便能通信了,但仍旧有些配置需要做改善,以使其能有正确调用所需服务。暂做记录,后续会跟踪此问题。
相關文章
-
The wholeness of life 为题目的作文
Once a circle missed a wedge. The circle wanted to be whole, so it went around looking for its missing piece. But because it was incomplete and therefore could roll only very slowly, it admired the fl -
What shall we do first为题目的作文
What shall we do firstNow most of us are the only children in our families. Our parents love us very much and they try their best to do everything for us, but some of us become selfish. As students, I -
Box Jellyfish Eyes Aim At The Trees美文欣赏
Box Jellyfish Eyes Aim At The TreesBox jellyfish have it over the rest of the jellyfish world—they have true eyes, featuring coeas, lenses and retinas. They have a more sophisticated nervous system t -
My Life After Class为题目的作文
As I am in primary school now, I have class from Monday to Friday, so I am busy with my study, I don’t have much time to play. My life after class is enriched, one the one hand, I need to finish my h -
css3的Flexible Boxes详细使用教程
Flexible Box是什么?Flexible意为可伸缩的,Box意为盒子,可以理解为一种新式的盒模型——伸缩盒模型。由CSS3规范提出,这是在原有的大家非常熟悉的block, inline-block, inline的基础上延伸出的新一代布局模式。浏览器兼容 -
php函数method-exists()与is-callable()有何区别
php函数method_exists() 与is_callable()的区别在哪?在php面相对象设计过程中,往往我们需要在调用某一个方法是否属于某一个类的时候做出判断,常用的方法有 method_exists()和is_callable(),相比之下,is_callable()函数要 -
Linux Shell脚本教程(一):Shell入门
一、Shell简介诸多类Unix操作系统的设计令人惊叹。即便是在数十年后的今天,Unix式的操作系统架构仍是有史以来最佳的设计之一。这种架构最重要的一个特性就是命令行界面或者shell。shell环境使得用户能与操作系统 -
Linux中Firefox如何安装Flash插件
因为Linux系统不再支持Flash插件,导致在使用Firefox浏览器的时候因缺少Flash插件而观看不了Flash,那么要如何为Firefox浏览器安装Flash插件呢?随小编一起来详细了解下吧。早前Adobe已经宣布取消用于Linux的'flash插件支 -
Chinese Style为题目的作文
Nowadays,more and more families choose to send their children to school and pick them up after school st everywhere in China you can see the phenomenon: parents are waiting anxiously for their children -
How we can speak English well为题目的作文
How we can speak English well?As everyone knows,English is very important has been used everywhere in the has become the most common language on Inteet and for inteational trade. If we can speak Eng