Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error while giving action Handler in JSF  RSS feed

 
Venkateshkumar Singaravelu
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actions written in tag shows me error,I configured correctly in facelet-config.xml
My action tag looks like <h:commandButton image="IconImages/search-icon.jpg" value="Submit" action="{test.getLogin()}"/>
com.sun.facelets.tag.TagAttributeException: /runTest.xhtml @26,99 action="#{test.getTest()}" Error Parsing: #{test.getTest()}


at com.sun.facelets.tag.TagAttribute.getMethodExpression(TagAttribute.java:144)
at com.sun.facelets.tag.jsf.ActionSourceRule$ActionMapper2.applyMetadata(ActionSourceRule.java:65)
at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:144)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:503)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:546)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.ELException: Error Parsing: #{test.getTest()}
at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:125)
at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:146)
at org.apache.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:197)
at org.apache.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:57)
at com.sun.facelets.tag.TagAttribute.getMethodExpression(TagAttribute.java:141)
... 43 more
Caused by: org.apache.el.parser.ParseException: Encountered "getTest(" at line 1, column 8.
Was expecting:
<IDENTIFIER> ...

at org.apache.el.parser.ELParser.generateParseException(ELParser.java:2129)
at org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:2009)
at org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1076)
at org.apache.el.parser.ELParser.ValueSuffix(ELParser.java:1053)
at org.apache.el.parser.ELParser.Value(ELParser.java:997)
at org.apache.el.parser.ELParser.Unary(ELParser.java:967)
at org.apache.el.parser.ELParser.Multiplication(ELParser.java:730)
at org.apache.el.parser.ELParser.Math(ELParser.java:650)
at org.apache.el.parser.ELParser.Compare(ELParser.java:462)
at org.apache.el.parser.ELParser.Equality(ELParser.java:356)
at org.apache.el.parser.ELParser.And(ELParser.java:300)
at org.apache.el.parser.ELParser.Or(ELParser.java:244)
at org.apache.el.parser.ELParser.Choice(ELParser.java:198)
at org.apache.el.parser.ELParser.Expression(ELParser.java:190)
at org.apache.el.parser.ELParser.DeferredExpression(ELParser.java:128)
at org.apache.el.parser.ELParser.CompositeExpression(ELParser.java:56)
at org.apache.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:93)
... 47 more
 
Tim Holloway
Bartender
Posts: 18705
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "action" attribute's use as a method call is implied, so the correct syntax would be 'action="#{test.getLogin}"'

However, prefixing an action method name with "get" is a questionable thing to do, since it makes the action look like a property-fetch method, not an action method.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!