Skip to main content
Bumped by Community user
added 36 characters in body
Source Link
Bart Koopman
  • 29.6k
  • 3
  • 40
  • 90

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

File 1 : 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"

${cons.THREE}

[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 i handle String constants in jsp in dxa framework ??

We are using the JAVA MVC framework. DXA 1.5 and sdl 2013

File 1 : 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"/>

${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

How do I handle String constants in JSP in the DXA framework ?

We are using the Java MVC framework, DXA 1.5 and SDL Tridion 2013

added 61 characters in body
Source Link

File 1 : 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"

${cons.THREE}

[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 i handle String constants in jsp in dxa framework ??

We are using the JAVA MVC framework. DXA 1.5 and sdl 2013

File 1 : 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"

${cons.THREE}

[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 i handle String constants in jsp in dxa framework ??

File 1 : 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"

${cons.THREE}

[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 i handle String constants in jsp in dxa framework ??

We are using the JAVA MVC framework. DXA 1.5 and sdl 2013

Source Link

How to use JAVA contants in JSP for DXA 1.5

File 1 : 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"

${cons.THREE}

[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 i handle String constants in jsp in dxa framework ??