Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Record Analysis of the Integration of Flex Project and SSH Project

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you the record analysis of the integration of Flex project and SSH project. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Development project reuse is a very important development tool, honest development of a SSH project, in which a function can be reused before the entire Flex project (through BlazeDS to interact with the java side, the required services and servlet are controlled by spring and springMVC). In fact, the principle of integrating Flex projects with other projects is very simple, which is equivalent to embedding flash in other projects, but the problem of communicating with java through BlazeDS should also be considered here. The following is a brief description of the problems encountered when integrating from the Flex project to the SSH project.

Flex project and SSH project integration process:

Copy the corresponding html files and related style files of the swf file box compiled and generated by the Flex project into the SSH project, at the same time, put the java classes and Spring configuration files used by the flex project into the corresponding directory of SSH, and configure the web.xml file. Some screenshots are shown below:

Phenomenon:

1. In the flex project, when compiling the swf file, if you do not change the relevant configuration in the .flexProperties file: serverContextRoot= "/ Flex project name" serverRootURL= "http://localhost:8080//Flex project name", and directly use the compiled swf file for integration, the foreground prompts send failed, and the console does not output any message. This problem is the reason why the BlazeDS channel was not found. Please see the following figure:

two。 If you change the relevant configuration in the .flexProperties file: serverContextRoot= "/ SSH project name" serverRootURL= "http://localhost:8080/ SSH project name", use the compiled swf file to integrate directly. However, depending on where the configuration files are stored, there are two phenomena:

1) when you put the configuration file required by Flex to the location shown in red in the above figure, and when the web.xml is configured as shown in the following figure

When logging in, the flexend prompts:

Console prompt:

[BlazeDS] HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.

[BlazeDS] Channel endpoint my-amf received request.

[BlazeDS] Channel endpoint my-amf received request.

[BlazeDS] Channel endpoint my-amf received request.

When you click to log in the second time, the flexside prompts:

There is only one more prompt on the console:

[BlazeDS] Channel endpoint my-amf received request.

2) when placing the required configuration files for Flex in the red location shown in the following figure

When the web.xml configuration file is configured as shown in the following figure

When logging in, the flexend prompts:

Console prompt:

[BlazeDS] HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.

[BlazeDS] Channel endpoint my-amf received request.

[BlazeDS] Channel endpoint my-amf received request.

[BlazeDS] Channel endpoint my-amf received request.

It's the same problem the second time you click to log in.

This article only briefly describes the problems that are very likely to be encountered in the integration process, and does not substantially solve this problem, but the above can reflect two problems, one is the channel problem of the interaction between Flex and java, and the other is that even if it can communicate, there are still some configurations that need to be improved so that it can correctly invoke the required services. Take notes for the time being, and this issue will be followed up later.

The above is the record analysis of the integration of the Flex project and the SSH project. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report