myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gärtner (JIRA) <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-1682) MyFaces 1.2 not work properly with value parameter
Date Mon, 13 Aug 2007 22:55:30 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-1682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519547
] 

Andreas Gärtner commented on MYFACES-1682:
------------------------------------------

I ran into the exaxt same problem. My personal solution (since it seems to be a misbuild of
the .tld-files): 
- a subversion check-out of MyFaces 1.2.1-snapshot
- download of maven
- building of Myfaces 1.2.1 with maven
- using newly built SNAPSHOT.jars.

It did solve the the first mentioned problem 'According to TLD or attribute directive in tag
file, attribute value does not accept any expressions'. A f:loadBundle statement seems to
work fine, too.
Maybe the newly built .tlds could be backported to 1.2.0, but I haven't checked so far. Jeroen
Benckhuijsen seems to be correct, as version 1.2.1 only builds h.tld and myfaces_core.tld.


> MyFaces 1.2 not work properly with value parameter
> --------------------------------------------------
>
>                 Key: MYFACES-1682
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1682
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions:  1.2.0
>         Environment: Tomcat 6.0.10
> MyFaces 1.2
>            Reporter: Vitaly Smyk
>            Priority: Critical
>
> <%@ page import="javax.faces.context.FacesContext" %>
> <%@ page import="javax.faces.application.FacesMessage" %>
> <%@ taglib prefix="jsf" uri="http://java.sun.com/jsf/core" %>
> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
> <%--<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>--%>
> <%--<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>--%>
> <%--
>   Date: Mar 15, 2007
>   Time: 4:46:53 PM
> --%>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <jsf:view>
>     <%
>         FacesContext.getCurrentInstance().addMessage(null,new FacesMessage("test"));
>     %>
> <html>
>   <head><title>Simple jsp page</title></head>
>   <body>Place your content here
>    <h:form>
>       <h:messages/>
>        <h:outputText value="#{s.valuetest}"/>
>   </h:form>
>   </body>
> </html>
> </jsf:view>
> libs in lib directory:
> commons-beanutils-1.7.0.jar
> commons-codec-1.3.jar
> commons-collections-3.2.jar
> commons-digester-1.8.jar
> commons-discovery-0.4.jar
> commons-el-1.0.jar
> commons-logging-1.1.jar
> jstl-1.2.jar
> myfaces-api-1.2.0.jar
> myfaces-impl-1.2.0.jar
> web.xml config:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
> <web-app>
>  
>  <context-param>
>     <param-name>com.sun.faces.expressionFactory</param-name>
>     <param-value>org.apache.el.ExpressionFactoryImpl</param-value>
> </context-param>
>  
>     <servlet>
>         <servlet-name>Faces Servlet</servlet-name>
>         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>         <load-on-startup>1</load-on-startup>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>/faces/*</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.faces</url-pattern>
>     </servlet-mapping>
> </web-app>
> and finally faces config:
> <?xml version='1.0' encoding='UTF-8'?>
> <!DOCTYPE faces-config PUBLIC
>   "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
>   "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
>  
> <faces-config>
>       <managed-bean>
>           <managed-bean-name>s</managed-bean-name>
>           <managed-bean-class>test.Bean</managed-bean-class>
>           <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
> </faces-config>
> if page contains simple message output all work fine!
> If any value in tag then i got this error:
> javax.servlet.ServletException: /test.jsp(21,7) According to TLD or attribute directive
in tag file, attribute value does not accept any expressions
> 	javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
>  
> root cause 
> javax.faces.FacesException: /test.jsp(21,7) According to TLD or attribute directive in
tag file, attribute value does not accept any expressions
> 	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:340)
> 	org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
> 	org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> 	org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
> 	javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>  
> root cause 
> org.apache.jasper.JasperException: /test.jsp(21,7) According to TLD or attribute directive
in tag file, attribute value does not accept any expressions
> 	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
> 	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
> 	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
> 	org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1172)
> 	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:819)
> 	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> 	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> 	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> 	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
> 	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> 	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> 	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> 	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
> 	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> 	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> 	org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> 	org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
> 	org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
> 	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> 	org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
> 	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
> 	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
> 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:334)
> 	org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
> 	org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> 	org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
> 	javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> i'm try new installation og myfaces-1.2 and got another exception:
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: Unable to convert string "Test" to class "javax.el.ValueExpression"
for attribute "value": Property Editor not registered with the PropertyEditorManager
> 	at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:887)
> 	at org.apache.jsp.test_jsp._jspx_meth_h_005foutputText_005f0(test_jsp.java:138)
> 	at org.apache.jsp.test_jsp._jspx_meth_f_005fview_005f0(test_jsp.java:102)
> 	at org.apache.jsp.test_jsp._jspService(test_jsp.java:65)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
> 	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
> 	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
> 	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
> 	at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:334)
> 	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:254)
> 	at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
> 	at java.lang.Thread.run(Thread.java:595)
> So finally:
> if jsp page has value with EL expr i got: According to TLD or attribute directive in
tag file, attribute value does not accept any expressions
> if wihout EL expr: org.apache.jasper.JasperException: Unable to convert string "Test"
to class "javax.el.ValueExpression" for attribute "value": Property Editor not registered
with the PropertyEditorManager

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message