File 1 : Constants.java
package com.sdl.webapp.main.common;
public class Constants {Constants.java
package com.sdl.webapp.main.common;
public class Constants {
public static final String LARGE = "Large";
}
}
File 2 : demo.jsp
jsp:useBean id="entity" type="com.sdl.modules.model.common.GenericComponentCollectionModel" scope="request"
jsp:useBean id="cons" type="com.sdl.webapp.main.common.Constants" scope="request" demo.jsp
${cons.THREE}
<jsp:useBean id="entity" type="com.sdl.modules.model.common.GenericComponentCollectionModel" scope="request"/>
<jsp:useBean id="cons" type="com.sdl.webapp.main.common.Constants" scope="request"/>
${cons.LARGE}
[3/21/17 11:53:24:125 EDT] 00000076 SystemOut O 11:53:24.122 [WebContainer : 2] ERROR c.s.w.c.impl.taglib.dxa.EntitiesTag - Error while processing entities tag com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.InstantiationException: bean cons not found within scope
[3/21/17 11:53:24:125 EDT] 00000076 SystemOut O 11:53:24.122 [WebContainer : 2] ERROR c.s.w.c.impl.taglib.dxa.EntitiesTag - Error while processing entities tag com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.InstantiationException: bean cons not found within scope
How do iI handle String constants in jspJSP in dxathe DXA framework ??
We are using the JAVAJava MVC framework., DXA 1.5 and sdlSDL Tridion 2013