如何全局导入JSTL taglib?(How to import a JSTL taglib globally?)
是否可以全局导入类似JSTL的taglib,这样您就不需要为每个JSP页面定义它?
Is it possible to import a taglib like JSTL globally so that you don't need to define it for every single JSP page ?
原文:https://stackoverflow.com/questions/18885787
最满意答案
我面临同样的问题,以下是我遵循的步骤并获得成功。
在
locationmanager
添加地理栅栏阵列数据后。 使用下面的代码相同。for (CLRegion *monitored in [locationManagerGeofence monitoredRegions]) { [locationManagerGeofence stopMonitoringForRegion:monitored]; } self.geofencesArray = [NSMutableArray arrayWithArray:[self buildGeofenceData]]; if([CLLocationManager regionMonitoringAvailable]) { for (CLRegion *region in self.geofencesArray) { [locationManagerGeofence startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest]; } } else { [BB_Global displayAlertWithTitle:@"" message:@"This app requires region monitoring features which are unavailable on this device."]; }
- 确保您的wifi已开启。
使用以下代表检查您的区域的开始监控。
-(void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region { NSLog(@"Started monitoring %@ region", region.identifier); }
使用这两种委托方法进行地理围栏。 1)
DidEnter
2)DidExit
- 通过某些移动或其他位置测试您的设备(确保将地理围栏设置为具有100米半径的不同位置)。 为此,您在
DidEnter
和DidExit
方法中实现本地通知,因此无需调试。 一旦你的方法将被调用当地通知是火。- 获得成功:)
I have face same problem, Following are the steps I was follow and get succeed.
After add your geofence Array data in
locationmanager
. Use below code for the same.for (CLRegion *monitored in [locationManagerGeofence monitoredRegions]) { [locationManagerGeofence stopMonitoringForRegion:monitored]; } self.geofencesArray = [NSMutableArray arrayWithArray:[self buildGeofenceData]]; if([CLLocationManager regionMonitoringAvailable]) { for (CLRegion *region in self.geofencesArray) { [locationManagerGeofence startMonitoringForRegion:region desiredAccuracy:kCLLocationAccuracyBest]; } } else { [BB_Global displayAlertWithTitle:@"" message:@"This app requires region monitoring features which are unavailable on this device."]; }
- Make sure your wifi is On.
Check your start monitoring for region with below delegate.
-(void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region { NSLog(@"Started monitoring %@ region", region.identifier); }
Use these two delegate method for geofence. 1)
DidEnter
2)DidExit
- Test your device with some movement or some other place (Make sure set your geofence set with different location with 100 meter radius). for the same you implement local notification in
DidEnter
andDidExit
method so no need to debug. once your method will be call that time local notification is fire.- Get Success :)
相关问答
更多-
iphone5s ios8.1怎么使用winterboard[2022-06-01]
前提:保证手机设备已经完美越狱iOS7,并找到Cydia 1,进入Cydia--搜索--输入--winterboard 2,安装后重启spring,winterboard就安装完成了! 当然大家可能会觉得楼主的手机桌面跟大家不一样,那安装完winterboard后怎么改变这些图标呢?接着往下看: 1,手机安装完winterboard后,将手机链接电脑。 2,打开iTools,依次点开文件系统(越狱)-- Library-- Themes,如下图所示,将下载得到的winterboard ... -
您没有比较颜色,您正在比较指针值: if(tile.color == searchColor) 这测试tile.color和searchColor是否都指向相同的内存地址。 根据颜色的创建方式,这些地址可能不同。 尝试测试各个颜色组件,如下所示: if (tile.color.r == seachColor.r && tile.color.g == searchColor.b && etc ..) 请注意, 浮点值的相等性是“相对的” 。 The cause is the UIDeviceRGBColo ...
-
你如何测试位置? 这些地区有点棘手,但一旦建立起来,它们通常会很好。 我通常做的测试区域只是使用模拟器中的自定义位置。 使用与添加区域相同的坐标。 1000M相当大。 我已经测试了小到15-20M的地区。 如果你有正确的坐标,应该没问题。 尝试从Apple HQ和您的自定义坐标来回切换。 如果你有他们注销,你应该能够看到didEnter和didExit方法几乎立即行程。 您可能遇到的一个方面是回调可能无法获得您的方法。 除非我将我的AppDelegate设置为CLLocationManagerDelegat ...
-
在iOS上进行GeoFencing(GeoFencing on iOS)[2022-03-07]
您定义的半径为15米。 那太小了。 首先,尝试50米或更长时间。 如果您确实已进入该地区,请查看地图应用。 此外,我希望你的意思是“发送到后台”,而不是关闭。 确保您已将应用程序设置为允许在后台运行? (通过plist) 更新: 最后,事实证明你终止了申请。 那么你当然不会再得到任何一个地方活动了。 解决方案:不要通过双击主页按钮来终止它,只需选择白色十字,只需单击主页按钮关闭它,然后它就有机会在后台运行。 Update2:即使应用程序被终止,ios在注册到位置监视服务时重新启动它:来自CllLocatio ... -
我面临同样的问题,以下是我遵循的步骤并获得成功。 在locationmanager添加地理栅栏阵列数据后。 使用下面的代码相同。 for (CLRegion *monitored in [locationManagerGeofence monitoredRegions]) { [locationManagerGeofence stopMonitoringForRegion:monitored]; } self.geofencesArray = [NSMutableArray arrayWit ...
-
可以从后台调用beginBackgroundTaskWithExpirationHandler 。 从iOS8开始,此调用将从10秒延长运行时间至180秒。 请记住,您需要请求始终授权位置服务,这是运行区域监控所需的。 我建议你使用背景位置键。 我忘了在我的一个应用程序中设置它,它仍然在接收区域进入/退出事件。 然而, - 这种行为可能会随着iOS的小升级而改变 - 该应用可能会被Apple拒绝 It is OK to call beginBackgroundTaskWithExpirationHandle ...
-
如果存在iFrame,则需要让他们的内部文档执行鼠标和键盘操作。 对于UIWebView或WKWebView,这意味着在脚本的开头添加2行以插入到网页中。 例: NSString *scriptToInsert=@"var iFrame=document.getElementById('idOfFrame'); \ var innerDoc=iFrame.innerDocument || iFrame.contentWindow.document; \ ...
-
尝试在模拟器上运行应用程序。 然后从模拟器菜单Debug-> Location-> CustomLocation中选择并填充CLCircularRegion的坐标。 现在应该触发-didEnterRegion方法 Try running app on simulator. Then choose from simulator menu Debug->Location->CustomLocation and fill the coordinates of your CLCircularRegion. Now ...
-
干得好! 一切似乎都在起作用。 (除了为每条不同的日志消息看到三条日志行之外的奇怪例外 - 不确定为什么会发生这种情况。) 日志显示您在信标检测中有一个退出,导致退出事件在05-19 23:18:57.782,然后另一个进入事件在05-19 23:19:01.537。 虽然这个时间段看起来很短(约4秒),但辍学率必须明显长于此时间。 默认情况下,Android Beacon Library不会发送区域退出事件,直到它没有看到与区域定义匹配10秒的信标。 这意味着您的Android设备在没有来自Raspber ...
-
我最终使用了CLRegion.containsCoordinate(location.coordinate)方法。 它的工作方式几乎相同。 一旦对象进入我的设置区域,它将返回true,从此处我可以知道它何时进入并退出该区域。 I ended up using the CLRegion.containsCoordinate(location.coordinate) method instead. It works pretty much the same way. Once the object has en ...