简体   繁体   English

页面重新加载时,将加载JSF类初始化方法

[英]JSF class init-method loads upon page reload

I have a class instantiated like so in my applicationContext.xml: 我在applicationContext.xml中有一个实例化的类:

<bean id="class1" class="com.action.abc.class1" scope="session" init-method="init1"> </bean>

The init1 method is being called along with the constructor for class1 every time the page is reloaded (refresh button in browser). 每次重新加载页面时,init1方法都会与class1的构造方法一起被调用(浏览器中的刷新按钮)。 To my understanding, if the scope is session and not request, the class shouldn't be instantiated again, and instead should reside in the session that's created upon initial page load. 据我了解,如果范围是会话而不是请求,则该类不应再次实例化,而应驻留在初始页面加载时创建的会话中。 I'm running this on a local weblogic 9.2 instance. 我正在本地的weblogic 9.2实例上运行它。 Any ideas? 有任何想法吗?

Thanks 谢谢

EDIT: I found the issue. 编辑:我发现了问题。 My weblogic server was not setup correctly to keep cookies. 我的weblogic服务器未正确设置以保留cookie。 Thanks! 谢谢!

EDIT: I found the issue. 编辑:我发现了问题。 My weblogic server was not setup correctly to keep cookies. 我的weblogic服务器未正确设置以保留cookie。 Thanks! 谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM