struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: EL - can't get access to my constants
Date Wed, 25 Feb 2004 13:21:15 GMT
How did you try to use it in your EL?

It doesn't look very Javabean-specification-conformant.

i.e. use  myProperty for getMyProperty() and setMyProperty()

On 02/25/2004 12:02 PM Axel GroƟ wrote:
> dear friends!
> 
> i declared a getter method for a constant, but i can't use it using jsp2.0
> Expression Language.
> 
> public class Constants{
> ..
> public static String getBEAN_PROP_SYSTEM() {
> 		return BEAN_PROP_SYSTEM;
> 	}
> ..
> }
> 
> in the jsp:
> works fine:
>  <%= ((Constants)session.getAttribute("constants")).getBEAN_PROP_SYSTEM() %>
> 
> [DEBUG] InsertTag - -[ServletException in:/WEB-INF/contents/System.jsp]
> Unable to find a value for "BEAN_PROP_SYSTEM" in object of class
> "at.ftw.struts.Constants" using operator "."'
> <javax.servlet.jsp.el.ELException: Unable to find a value for
> "BEAN_PROP_SYSTEM" in object of class "at.ftw.struts.Constants" using
> operator ".">javax.servlet.jsp.el.ELException: Unable to find a value for
> "BEAN_PROP_SYSTEM" in object of class "at.ftw.struts.Constants" using
> operator "."
> 
> 
> i attached the full stacktrace
> 
> thanks in advance,
> Axel
> 
> 
> ------------------------------------------------------------------------
> 
> javax.servlet.jsp.el.ELException: Unable to find a value for "BEAN_PROP_SYSTEM" in object
of class "at.ftw.struts.Constants" using operator "."
> 	at org.apache.commons.el.Logger.logError(Logger.java:481)
> 	at org.apache.commons.el.Logger.logError(Logger.java:498)
> 	at org.apache.commons.el.Logger.logError(Logger.java:611)
> 	at org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:340)
> 	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
> 	at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
> 	at org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
> 	at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:941)
> 	at org.apache.jsp.WEB_002dINF.contents.System_jsp._jspService(System_jsp.java:130)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.WEB_002dINF.contents.handleException_jsp._jspx_meth_tiles_insert_0(handleException_jsp.java:226)
> 	at org.apache.jsp.WEB_002dINF.contents.handleException_jsp._jspx_meth_c_catch_0(handleException_jsp.java:194)
> 	at org.apache.jsp.WEB_002dINF.contents.handleException_jsp._jspService(handleException_jsp.java:117)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.WEB_002dINF.layouts.vboxLayout_jsp._jspService(vboxLayout_jsp.java:139)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.WEB_002dINF.layouts.anyLevelMenuLayout_jsp._jspService(anyLevelMenuLayout_jsp.java:500)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.WEB_002dINF.layouts.vboxLayout_jsp._jspService(vboxLayout_jsp.java:139)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.WEB_002dINF.layouts.htmlLayout_005fjsp2_005f0_jsp._jspx_meth_tiles_insert_1(htmlLayout_005fjsp2_005f0_jsp.java:230)
> 	at org.apache.jsp.WEB_002dINF.layouts.htmlLayout_005fjsp2_005f0_jsp._jspx_meth_c_catch_1(htmlLayout_005fjsp2_005f0_jsp.java:199)
> 	at org.apache.jsp.WEB_002dINF.layouts.htmlLayout_005fjsp2_005f0_jsp._jspx_meth_html_html_0(htmlLayout_005fjsp2_005f0_jsp.java:118)
> 	at org.apache.jsp.WEB_002dINF.layouts.htmlLayout_005fjsp2_005f0_jsp._jspService(htmlLayout_005fjsp2_005f0_jsp.java:71)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:630)
> 	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:542)
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1002)
> 	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:626)
> 	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
> 	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
> 	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
> 	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
> 	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
> 	at org.apache.jsp.__index_profileAdmin_jsp._jspx_meth_tiles_insert_0(__index_profileAdmin_jsp.java:80)
> 	at org.apache.jsp.__index_profileAdmin_jsp._jspService(__index_profileAdmin_jsp.java:56)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
> 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:506)
> 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:443)
> 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)
> 	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
> 	at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
> 	at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1012)
> 	at org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:345)
> 	at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:980)
> 	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255)
> 	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
> 	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
> 	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
> 	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
> 	at java.lang.Thread.run(Thread.java:534)
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message