我的问题是在这个论坛上提出的,但答案并不能完全满足我的情况。在 JSF 2.0 中,可以在 bean 注释中声明@ManagedBean
or@ManagedBean(name="blah")
和 bean 的范围,而不是在其中声明它们并在faces-config.xml
其中使用 bean*.xhtml, *.jsp
等。
但是,这是我的问题,如果您声明使用注释,则 Eclipse 中的代码完成不起作用。它只有在声明 bean 时才有效faces-config.xml
。论坛中的另一个帖子确实给出了答案:JBoss Tools,但我找不到它是否适用于 GlassFish。
我使用 Eclipse Indigo Java EE 和 GlassFish。如果我安装它应该可以工作吗?或者还有另一种更兼容的方式。
感谢您的时间和愉快的编码!
细节:
Cannot complete the install because of a conflicting dependency.
Software being installed: JBoss Tools JSF 3.3.0.v20120302-0331-H69-Beta1 (org.jboss.tools.jsf.feature.feature.group 3.3.0.v20120302-0331-H69-Beta1)
Software currently installed: Oracle GlassFish Server Tools 1.8.0.201110200920 (oracle.eclipse.tools.indigo.glassfish.feature.group 1.8.0.201110200920)
Only one of the following can be installed at once:
Server UI 1.1.305.v20110511 (org.eclipse.wst.server.ui 1.1.305.v20110511)
Server UI 1.1.207.v20110119 (org.eclipse.wst.server.ui 1.1.207.v20110119)
Server UI 1.3.0.v20120210_1439 (org.eclipse.wst.server.ui 1.3.0.v20120210_1439)
Server UI 1.1.306.v20110823_1704 (org.eclipse.wst.server.ui 1.1.306.v20110823_1704)
Server UI 1.1.209.v20110914_1539 (org.eclipse.wst.server.ui 1.1.209.v20110914_1539)
Cannot satisfy dependency:
From: Oracle GlassFish Server Tools 4.1.0.201110200920 (oracle.eclipse.tools.glassfish 4.1.0.201110200920)
To: bundle org.eclipse.wst.server.ui [1.1.305,1.2.0)
Cannot satisfy dependency:
From: Oracle GlassFish Server Tools 1.8.0.201110200920 (oracle.eclipse.tools.indigo.glassfish.feature.group 1.8.0.201110200920)
To: oracle.eclipse.tools.glassfish [4.1.0.201110200920]
Cannot satisfy dependency:
From: WST Server UI 3.3.2.v20111026_1748-7B79FBdAtJcez0EONePJUSNPjBC42 (org.eclipse.wst.server_ui.feature.feature.group 3.3.2.v20111026_1748-7B79FBdAtJcez0EONePJUSNPjBC42)
To: org.eclipse.wst.server.ui [1.3.0.v20120210_1439]
Cannot satisfy dependency:
From: Eclipse Web Developer Tools 3.3.2.v201111030500-7O7IFj6EMjB7yO1Xs_G1kMtQeOye6HTXFWve95_R (org.eclipse.wst.web_ui.feature.feature.group 3.3.2.v201111030500-7O7IFj6EMjB7yO1Xs_G1kMtQeOye6HTXFWve95_R)
To: org.eclipse.wst.server_ui.feature.feature.group [3.3.2.v20111026_1748-7B79FBdAtJcez0EONePJUSNPjBC42]
Cannot satisfy dependency:
From: JBoss Tools JSF 3.3.0.v20120302-0331-H69-Beta1 (org.jboss.tools.jsf.feature.feature.group 3.3.0.v20120302-0331-H69-Beta1)
To: org.eclipse.wst.web_ui.feature.feature.group 3.3.2