Post Jobs

HTML5开发移动web应用,ajax请求返回的数据看不到回调函数没有执行也没报错

HTML5开发移动web应用——SAP UI5篇(8)

本次对之前学习的SAP UI5框架知识进行简单小结,以及重点部分知识的梳理。

1、在UI5使用过程中,命名空间的概念很重要。

2、一般的sap组件引用格式如下:

sap.ui.define([
   "sap/ui/core/UIComponent",
   "sap/ui/model/json/JSONModel",
   "sap/ui/model/resource/ResourceModel"], function (UIComponent, JSONModel, ResourceModel) 

define后每引用sap的一个组件,后面的function就要传入一个对应的参数。

3、以下是component使用的基本框架:

sap.ui.define([
   "sap/ui/core/UIComponent"], function (UIComponent) {
   "use strict";
   return UIComponent.extend("", {

      init : function () {
         // call the init function of the parent
         UIComponent.prototype.init.apply(this, arguments);
}
   });});

Component的构建流程如上,extendUIComponent这个框架,里面init为初始化函数,里面可以设定其他属性(包括配置模型等),如下:

sap.ui.define([
   "sap/ui/core/UIComponent",
   "sap/ui/model/json/JSONModel",
   "sap/ui/model/resource/ResourceModel"], function (UIComponent, JSONModel, ResourceModel) {
   "use strict";
   return UIComponent.extend("sap.ui.demo.wt.Component", {
            metadata : {
rootView: "sap.ui.demo.wt.view.App"
},
      init : function () {
         // call the init function of the parent
         UIComponent.prototype.init.apply(this, arguments);
         // set data model
         var oData = {
            recipient : {
               name : "World"
            }
         };
         var oModel = new JSONModel(oData);
         this.setModel(oModel);

         // set i18n model
         var i18nModel = new ResourceModel({
            bundleName : "sap.ui.demo.wt.i18n.i18n"
         });
         this.setModel(i18nModel, "i18n");
      }
   });});

4、注意manifest文件在一个应用中的重要性,manifest.json是app的配置文件。

UI5篇(8)
本次对之前学习的SAP UI5框架知识进行简单小结,以及重点部分知识的梳理。
1、在UI5使用过程中,命名空…

Solaris IPMP两种配置方法

更换华为防火墙后,发现Solaris基于ip探测方式配置的IPMP
呈现failed状态。经过分析,更改为基于link的IPMP配置方式后,解决了这次问题。

1、Multiple interface Link based IPMP configuration
a. Active – Active configuration
Command line :

# ifconfig e1000g0 plumb 192.168.1.2 netmask + broadcast + group IPMPgroup up## ifconfig e1000g1 plumb group IPMPgroup upFor persistent configuration across reboots edit the files :/etc/hostname.e1000g0
192.168.1.2 netmask + broadcast + group IPMPgroup up
/etc/hostname.e1000g1
group IPMPgroup upBefore Failure :# ifconfig -a
lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 14inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255groupname IPMPgroupether 0:c:29:f6:ef:67
e1000g1: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 15inet 0.0.0.0 netmask ff000000groupname IPMPgroupether 0:c:29:f6:ef:71After Failure# ifconfig -a
lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1inet 127.0.0.1 netmask ff000000
e1000g0: flags=19000802[BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED] mtu 0 index 14inet 0.0.0.0 netmask 0groupname IPMPgroupether 0:c:29:f6:ef:67
e1000g1: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 15inet 0.0.0.0 netmask ff000000groupname IPMPgroupether 0:c:29:f6:ef:71
e1000g1:1: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 15inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255

b. Active standby Configuration
Command line :

# ifconfig e1000g0 plumb 192.168.1.2 netmask + broadcast + group IPMPgroup up## ifconfig e1000g1 plumb group IPMPgroup standby upFor persistent configuration across reboots edit the files :/etc/hostname.e1000g0
192.168.1.2 netmask + broadcast + group IPMPgroup up
/etc/hostname.e1000g1
group IPMPgroup standby upBefore failure# ifconfig -a
lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 20inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255groupname IPMPgroupether 0:c:29:f6:ef:67
e1000g0:1: flags=1000842[BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 20inet 0.0.0.0 netmask 0
e1000g1: flags=69000842[BROADCAST,RUNNING,MULTICAST,IPv4,NOFAILOVER,STANDBY,INACTIVE] mtu 0 index 21inet 0.0.0.0 netmask 0groupname IPMPgroupether 0:c:29:f6:ef:71After failure# ifconfig -a
lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1inet 127.0.0.1 netmask ff000000
e1000g0: flags=19000802[BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED] mtu 0 index 20inet 0.0.0.0 netmask 0groupname IPMPgroupether 0:c:29:f6:ef:67
e1000g1: flags=21000842[BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY] mtu 1500 index 21inet 0.0.0.0 netmask 0groupname IPMPgroupether 0:c:29:f6:ef:71
e1000g1:1: flags=21000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY] mtu 1500 index 21inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255

2、Most commonly used Probe-Based IPMP configurations
a. Active – Active configuration
Groupname: ipmp0
Active interface(s): e1000g0
e1000g1
Standby interface(s): –
Data IP addresse(s): 192.168.1.2
Test IP addresse(s): 192.168.1.3
192.168.1.4
Command line :

# ifconfig e1000g0 plumb 192.168.1.2 netmask + broadcast + group ipmp0 up addif 192.168.1.3 netmask + broadcast + deprecated -failover up
#
# ifconfig e1000g1 plumb 192.168.1.4 netmask + broadcast + deprecated -failover group ipmp0 up


To ensure persistent configuration across reboots edit the files :
/etc/hostname.e1000g0:
192.168.1.2 netmask + broadcast + group ipmp0 up \addif 192.168.1.3 netmask + broadcast + deprecated -failover up
/
/etc/hostname.e1000g1:

192.168.1.4 netmask + broadcast + deprecated -failover group ipmp0 up
Before failure :
# ifconfig -a

lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 9

inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:67

e1000g0:1: flags=9040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER] mtu 1500 index 9

inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255

e1000g1: flags=9040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER] mtu 1500 index 10

inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:71


After failure :
# ifconfig -a

lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=19000802[BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED] mtu 0 index 9

inet 0.0.0.0 netmask 0

groupname ipmp0

ether 0:c:29:f6:ef:67

e1000g0:1: flags=19040803[UP,BROADCAST,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED] mtu 1500 index 9

inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255

e1000g1: flags=9040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER] mtu 1500 index 10

inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:71

e1000g1:1: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 10

inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
  1. Active – Standby
    The only difference in case of a active-standby configuration is – the
    interface configured as standby is not used to send any out bound
    traffic. Thus disabling the load balancing feature of an active-active
    configuration.
    Groupname: ipmp0
    Active interface(s): e1000g0
    Standby interface(s): e1000g1
    Data IP addresse(s): 192.168.1.2
    Test IP addresse(s): 192.168.1.3
    192.168.1.4
    Command line :
# ifconfig e1000g0 plumb 192.168.1.2 netmask + broadcast + group ipmp0 up addif 192.168.1.3 netmask + broadcast + deprecated -failover up
#
# ifconfig e1000g1 plumb 192.168.1.4 netmask + broadcast + deprecated -failover group ipmp0 standby up
To ensure persistent configuration across reboots edit the files :
/etc/hostname.e1000g0:

192.168.1.2 netmask + broadcast + group ipmp0 up \

addif 192.168.1.3 netmask + broadcast + deprecated -failover up

/
/etc/hostname.e1000g1:
192.168.1.4 netmask + broadcast + deprecated -failover group ipmp0 standby upBefore failure :
# ifconfig -a

lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 11

inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:67

e1000g0:1: flags=9040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER] mtu 1500 index 11

inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255

e1000g1: flags=69040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE] mtu 1500 index 12

inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:71
After failure :
# ifconfig -a

lo0: flags=2001000849[UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL] mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=19000802[BROADCAST,MULTICAST,IPv4,NOFAILOVER,FAILED] mtu 0 index 11

inet 0.0.0.0 netmask 0

groupname ipmp0

ether 0:c:29:f6:ef:67

e1000g0:1: flags=19040803[UP,BROADCAST,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED] mtu 1500 index 11

inet 192.168.1.3 netmask ffffff00 broadcast 192.168.1.255

e1000g1: flags=29040843[UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY] mtu 1500 index 12

inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255

groupname ipmp0

ether 0:c:29:f6:ef:71

e1000g1:1: flags=21000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4,STANDBY] mtu 1500 index 12

inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255

IPMP两种配置方法
更换华为防火墙后,发现Solaris基于ip探测方式配置的IPMP
呈现failed状态。经过分析,更改为基于link的IPMP配置方式后…

项目用的是ssh,使用jquery的$.post访问struts2的Action,哪里都没有报错,可就是没有结果。

现在$.post要返回保存着权限的集合Collection<Privilege>,权限类Privilege和用户类User相互关联,也就是Privilege里使用set集合保存着拥有这个权限的用户Set<User>,用户User里也使用set集合保存着用户有的权限Set<Privilege>。数据都到action里了,但是回调函数没有执行,并且使用浏览器调试也没看到返回的数据,最后找了半天,原因如下:

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章

网站地图xml地图