在Glassfish v3中使用JNDI配置/查找为JavaServer Faces设置项目阶段 [英] Set project stage for JavaServer Faces with JNDI configuration/lookup in Glassfish v3

查看:171
本文介绍了在Glassfish v3中使用JNDI配置/查找为JavaServer Faces设置项目阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我将舞台属性设置为 ,然后将舞台属性设置为开发阶段,但我的申请总是收到生产阶段。





我在Windows系统上使用GlassFish Server Open Source Edition 3.1(版本43)。



为了在JSF页面中呈现项目阶段,我使用下面的代码:

 < h:outputText value =Stage:#{facesContext.application.projectStage}/> 

在应用程序中使用项目阶段还有其他必要吗?该应用程序没有web.xml文件。

解决方案

一切正常,但不是 stage = Development ,请使用 value = Development
即用值替换阶段在属性名称字段中。


I'm trying to set the project stage for JavaServer Faces in a GlassFish application server v3 with a JNDI property.

I set the stage property to Development stage, but my application received always the Production stage.

I use GlassFish Server Open Source Edition 3.1 (build 43) on a windows system.

For rendering the project stage in the JSF page I use this:

<h:outputText value="Stage:#{facesContext.application.projectStage}"/>

Is anything else necessary to use the project stage in an application? The application has no web.xml file.

解决方案

Everything is correct, but instead of stage=Development, use value = Development, i.e. replace stage with value in the property name field.

这篇关于在Glassfish v3中使用JNDI配置/查找为JavaServer Faces设置项目阶段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆