You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paulo Angelo <re...@gmail.com> on 2008/07/08 19:52:09 UTC
Re: Passing Parameters Through EL
Hi Ppl,
I am still trying to make it run. I read these docs. Now I'm getting the
error:
org.apache.jasper.JasperException: Unable to compile class for JSP
(...)
*root cause*
java.lang.NullPointerException
java.util.Hashtable.containsKey(Hashtable.java:307)
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:258)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
My JSP, teste.jsp:
<%@ page session="false" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix= "f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="/META-INF/el.taglib.xml" prefix="teste" %>
<h:panelGrid id="header_group1" columns="2" styleClass="pageHeader1">
<t:outputLabel value="${teste:redireciona('01','01')}"></t:outputLabel>
</h:panelGrid>
my /META-INF/el.taglib.xml:
<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://teste</namespace>
<function>
<function-name>redireciona</function-name>
<function-class>xxx.web.plataforma.menu.MenuRedireciona</function-class>
<function-signature>
java.lang.Object redireciona(java.lang.String, java.lang.String)
</function-signature>
</function>
</facelet-taglib>
What is this error?
Thank you for help.
Paulo Angelo
On Fri, May 30, 2008 at 3:19 PM, Mike Kienenberger <mk...@gmail.com>
wrote:
>
> https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-function
>
>
https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-create-function
>
> On 5/30/08, Paulo Angelo <re...@gmail.com> wrote:
> > Hi all,
> >
> > Where can I get more docs about the first option?
> >
> > Thanx,
> >
> > PA
> >
> >
> > On Thu, May 29, 2008 at 5:35 PM, simon <si...@chello.at> wrote:
> >
> > >
> > > However if you definitely want to do this, then there are two options.
> > >
> > > (1)
> > > With JSF1.2 (or JSF1.1+facelets) you can register a static method with
> > > the EL engine, then call it from el. So for example, you could write a
> > > method
> > > public static void invokeMethod(MyBean bean, int param)
> > > then invoke it from your page:
> > > #{myns:invokeMethod(bean, 1)}
> > >
> > >
> >
> >
Re: Passing Parameters Through EL
Posted by Mike Kienenberger <mk...@gmail.com>.
Unfortunately, you can't mix facelets and jsp like you're doing. They
are two different view technologies.
I think there are some facelet taglibs out there that let you include
jsp tags in facelet pages, but I don't think there is any way to
include facelets in jsp pages.
On 7/8/08, Paulo Angelo <re...@gmail.com> wrote:
> Hi Ppl,
>
> I am still trying to make it run. I read these docs. Now I'm getting the
> error:
>
> org.apache.jasper.JasperException: Unable to compile class
> for JSP
> (...)
>
> *root cause*
>
> java.lang.NullPointerException
> java.util.Hashtable.containsKey(Hashtable.java:307)
> org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:258)
> org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:476)
> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
> org.apache.jasper.compiler.Parser.parse(Parser.java:133)
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
>
> My JSP, teste.jsp:
>
> <%@ page session="false"
> contentType="text/html;charset=utf-8"%>
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <%@ taglib uri="http://java.sun.com/jsf/core" prefix= "f"%>
> <%@ taglib uri="http://myfaces.apache.org/tomahawk"
> prefix="t"%>
> <%@ taglib uri="/META-INF/el.taglib.xml" prefix="teste" %>
>
>
> <h:panelGrid id="header_group1" columns="2" styleClass="pageHeader1">
> <t:outputLabel
> value="${teste:redireciona('01','01')}"></t:outputLabel>
> </h:panelGrid>
>
> my /META-INF/el.taglib.xml:
> <?xml version="1.0"?>
> <!DOCTYPE facelet-taglib PUBLIC
> "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
> "facelet-taglib_1_0.dtd">
>
> <facelet-taglib>
> <namespace>http://teste</namespace>
> <function>
> <function-name>redireciona</function-name>
>
> <function-class>xxx.web.plataforma.menu.MenuRedireciona</function-class>
> <function-signature>
> java.lang.Object redireciona(java.lang.String, java.lang.String)
> </function-signature>
> </function>
> </facelet-taglib>
>
>
>
> What is this error?
>
>
> Thank you for help.
>
> Paulo Angelo
>
>
>
> On Fri, May 30, 2008 at 3:19 PM, Mike Kienenberger <mk...@gmail.com>
> wrote:
> >
> >
> https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-function
> >
> >
> https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-create-function
> >
> > On 5/30/08, Paulo Angelo <re...@gmail.com> wrote:
> > > Hi all,
> > >
> > > Where can I get more docs about the first option?
> > >
> > > Thanx,
> > >
> > > PA
> > >
> > >
> > > On Thu, May 29, 2008 at 5:35 PM, simon <si...@chello.at> wrote:
> > >
> > > >
> > > > However if you definitely want to do this, then there are two options.
> > > >
> > > > (1)
> > > > With JSF1.2 (or JSF1.1+facelets) you can register a static method with
> > > > the EL engine, then call it from el. So for example, you could write
> a
> > > > method
> > > > public static void invokeMethod(MyBean bean, int param)
> > > > then invoke it from your page:
> > > > #{myns:invokeMethod(bean, 1)}
> > > >
> > > >
> > >
> > >
>
>