return arr;
}
private static Set<String> _call(PageContext pc , String packageName) throws IOException, ApplicationException {
PageContextImpl pci=(PageContextImpl) pc;
ConfigWebImpl config = (ConfigWebImpl) pc.getConfig();
Set<String> rtn=null;
//var SEP=server.separator.file;
// get enviroment configuration
boolean searchLocal = config.getComponentLocalSearch();
boolean searchRoot=config.getComponentRootSearch();
String path=StringUtil.replace(packageName, ".", File.separator, false);
// search local
if(searchLocal) {
//Resource dir=pc.getCurrentTemplatePageSource().getResourceTranslated(pc).getParentResource();
//dir=dir.getRealResource(path);
PageSource ps= pci.getRelativePageSourceExisting(path);
if(ps!=null){
Mapping mapping = ps.getMapping();
String _path=ps.getRealpath();
_path=ListUtil.trim(_path,"\\/");
String[] list = _listMapping(pc,mapping,_path);
if(!ArrayUtil.isEmpty(list)) rtn=add(rtn,list);
}
}
// check mappings (this includes the webroot)
if(searchRoot) {
String virtual="/"+StringUtil.replace(packageName, ".", "/", false);
Mapping[] mappings = config.getMappings();
Mapping mapping;
String _path;
String[] list;
for(int i=0;i<mappings.length;i++){
mapping=mappings[i];
if(StringUtil.startsWithIgnoreCase(virtual, mapping.getVirtual())) {
_path=ListUtil.trim(virtual.substring(mapping.getVirtual().length()),"\\/").trim();
_path=StringUtil.replace(_path, "/", File.separator, false);
list = _listMapping(pc,mapping,_path);
if(!ArrayUtil.isEmpty(list)) rtn=add(rtn,list);
}
}
}
// check component mappings
Mapping[] mappings = config.getComponentMappings();
Mapping mapping;
String[] list;
for(int i=0;i<mappings.length;i++){
mapping=mappings[i];
list=_listMapping(pc,mapping,path);