首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

帮小弟我解释一下这段代码

2011-12-07 
帮我解释一下这段代码?private void loadController(){InitialContext ctx this.getCtx(localhost:1099

帮我解释一下这段代码?
private void loadController(){
InitialContext ctx = this.getCtx("localhost:1099");
try {
UrlMapingDao dao = (UrlMapingDao) ctx
.lookup("UrlMapingDaoImpl/remote");
List<SysUrlMapping> result = dao.findBySite("www");
for (SysUrlMapping m : result) {
Class c = Class.forName(m.getController().getPath());
BaseController controller = (BaseController)c.newInstance();
controllers.put(m.getUri(), controller);
}

[解决办法]
1、初始化上下文。
2、实例化远程接口。
3、调用接口实现。
4、后面应该是对类操作,代码不全,比较模糊。
[解决办法]
1、初始化上下文。
2、实例化远程接口。
3、调用接口实现。 
up

热点排行