Discussion on cross-domain problems in WebLogic12.1.1 and solutions to cross-domain problems in several common middleware

Source: Internet
Author: User

1. Description of the problem

Yangzhou site in the beginning of the installation of the middleware WebLogic12.1.1 version, in accordance with the company before the solution WebLogic12 method, we have released a virtual path in the middleware/, root directory file for the root of the service.

This root file contains the following files:

The following issue occurs when the program initiates cross-domain access:

Visible, although we can access to the crossdomain.xml, and can get the full content inside, but the program can not go on, the back of the flash side of the cross-domain access can not be triggered.

2. Solution 2.1 Whether the Crossdomain.xml content is incorrect

Different flash versions may have different wording for crossdomain.xml requirements. The security mechanism has changed since Flash9. If we use FLEX3 to access the old version of Crossdomain.xml, we may report a security error error. There are articles on the Internet that say Flash9 after the crossdomain.xml, allow-http-request-headers-from configuration is necessary. However, after my own testing, I found that even if I did not write this configuration, it could be successful across the domain under Tomcat.

However, I still let the field engineers replace Flash with a newer version, and then crossdomain.xml the new version. Finally, there is no way to succeed across domains.

2.2 Whether there is a problem with other configurations

After finding the information on the Internet, we find that the configuration of Web. XML is also required. Check that the original configuration of our file is:

<?xml version= "1.0" encoding= "UTF-8"?>

<! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en" "Http://java.sun.com/dtd/web-app_2_3. DTD ">

<web-app id= "webapp_1166189002905" >

<display-name>root</display-name>

<!--Home file name--

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>

</welcome-file-list>

</web-app>

There is a mime-mapping configuration missing from the online recommended configuration, so I added the following configuration in Web. xml:

<mime-mapping>

<extension>xml</extension>

<mime-type>application/xml</mime-type>

</mime-mapping>

Publish the root folder again, and then find that this time the program can cross the domain successfully, the result:

3. Why join the Mime-mapping

We found that, in the WebLogic12.1.2, do not join this configuration, cross-domain can also be successful, but in 12.1.1 can not, the reason may be this version without this configuration, WebLogic cannot automatically recognize the XML file.

Once this configuration is added, the cross-domain will be normal in WebLogic12.1.2. Therefore, it is recommended to use this compatible version of Web. XML to configure WebLogic.

4. Supplement 4.1 What is a cross-domain

A cross-domain is a file or resource that accesses another domain name. For example, your SWF is for a server, and SWF has a request to access B server, so when you access the contents of B server, you need to cross-domain on the B server first.

4.2 Why cross-domain

In fact, not only flash,javascript and other scripts have cross-domain issues, this is mainly the security mechanism of their own decision, because cross-domain access to some files or resources is a certain risk, he exceeded the scope of the site itself, for the outside of the resources can not audit its security, In today's increasingly rampant network virus trojan, cross-domain restricted access is an important solution to its security policy.

5 cross-domain file placement addresses for other middleware summary 5.1 tomcat

The Crossdomain.xml placement in Tomcat is relatively straightforward, with the address: Apache-tomcat\webapps\root.

5.2 Kingdee 7.0

Its placement address is: apusic-as-7.0\domains\mydomain\applications\default\public_html.

5.3weblogic9.2

Its placement address is:.. \user_projects\applications\domain1\server\examples\build\mainwebapp.

5.4 ArcGIS-related middleware cross-domain

We also encounter cross-domain issues frequently in ArcGIS server. There are two kinds of situations.

If you are installing a. NET version, place the Crossdomain.xml file under the published IIS. The general path is c:/inetpub/wwwroot.

If the Java version is installed, for the arcgis9.3 version, the address is: {ArcGIS installation directory}/arcgis/java/web_output.

For the arcgis10.0 version, the address is: {ArcGIS installation directory}\arcgis\server10.0\java\manager\web_output.

For arcgis10.1 and 10.2, with my observations, they will be installed with crossdomain.xml files. The address is: {ArcGIS Server installation directory}\arcgis\server\framework\runtime\tomcat\webapps\root.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.