3
我想获得在独立的java类techcontants.java中声明的java常量,以便使用jstl在jsp中显示。如何使用jstl访问java类中描述的常量值
public class TechConstants {
public static final String PART = "Part";
public static final String DESCRIPTION = "Description";
public static final String VERSION = "Version";
}
在我view.jsp的,我需要这个值,这样使用ustl
<td class="Thd" width="14%">Part</td>
(我曾经尝试这样<c:outvalue="${TechConstants.PART}">
)
<td class="Thd" width="20%">Description</td>
<td class="Thd" width="10%">Version</td>
我使用的弹簧和JSTL,
我需要从我那里得到我的modelandview控制器中的常量值我必须将它传递给v IEW?
如果是这样请描述我在代码示例控制器做什么,或者我可以使用jstl直接在jsp中获取常量?
请帮我... – anto
@Japan特里维迪能否请你帮我 – anto
这是一门功课?如果是这样,请标记它。 – raddykrish