刚刚再设置了一下,解决了上面的问题
但又出了新的问题:
我的servlet中有一个init方法:
public void init() throws ServletException {
super.init();
try{
Context context = new InitialContext();
Object homeObject = context.lookup("FirstHome");
firstHome =
(FirstHome)PortableRemoteObject.narrow(
homeObject,
FirstHome.class);
}
catch(Exception e){
System.out.println("###at init###" + e.getMessage());
e.printStackTrace();
}
}
出现了异常,是怎么回事?
[05-3-11 14:42:45:844 CST] 6eaf193c SystemOut     O ###at init###Context: localhost/nodes/localhost/servers/server1, name: FirstHome: First component in name FirstHome not found.