jsf - TagException ... null (File not found) on creating custom Facelets tag -


this question has answer here:

i creating application based on jsf 2.2 (mojarra). using java ee ear project , dynamic web project generated eclipse, , glassfish server.

i created facelet tag file shown in https://stackoverflow.com/a/5716633/2266635 . when load page containing tag error (and http 500 error):

2014-03-24t00:32:10.904+0100|warning: standardwrappervalve[faces servlet]: servlet.service() servlet faces servlet threw exception javax.faces.view.facelets.tagexception: /index.xhtml @19,19 <fmk:login-form> null     @ com.sun.faces.facelets.tag.usertaghandler.apply(usertaghandler.java:144)     @ javax.faces.view.facelets.compositefacelethandler.apply(compositefacelethandler.java:95)     @ javax.faces.view.facelets.delegatingmetataghandler.applynexthandler(delegatingmetataghandler.java:137)     @ com.sun.faces.facelets.tag.jsf.componenttaghandlerdelegateimpl.apply(componenttaghandlerdelegateimpl.java:190)     @ javax.faces.view.facelets.delegatingmetataghandler.apply(delegatingmetataghandler.java:120)     @ javax.faces.view.facelets.compositefacelethandler.apply(compositefacelethandler.java:95)     @ com.sun.faces.facelets.compiler.namespacehandler.apply(namespacehandler.java:93)     @ com.sun.faces.facelets.compiler.encodinghandler.apply(encodinghandler.java:87)     @ com.sun.faces.facelets.impl.defaultfacelet.apply(defaultfacelet.java:161)     @ com.sun.faces.application.view.faceletviewhandlingstrategy.buildview(faceletviewhandlingstrategy.java:972)     @ com.sun.faces.lifecycle.renderresponsephase.execute(renderresponsephase.java:99)     @ com.sun.faces.lifecycle.phase.dophase(phase.java:101)     @ com.sun.faces.lifecycle.lifecycleimpl.render(lifecycleimpl.java:219) 

i have tried copy example @ http://www.mkyong.com/jsf2/custom-tags-in-jsf-2-0/ verbatim, , i'm still getting error (with different tag).

the error @ line 144 of usertaghandler.java filenotfoundexception. if supply invalid file <source> in taglib definition file, same error! never finds file tag source code.

here screenshot of file tree: http://www.fa2k.net/misc/project.png (sorry, not allowed post inline images yet)

snippets relevant files:

web-inf/web.xml

  <context-param>     <param-name>javax.faces.facelets_libraries</param-name>     <param-value>/web-inf/famake.taglib.xml</param-value>   </context-param> 

web-inf/famake.taglib.xml

<?xml version="1.0" encoding="utf-8"?> <facelet-taglib version="2.2"     xmlns="http://xmlns.jcp.org/xml/ns/javaee"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd">     <namespace>http://famake.com/jsf/facelets</namespace>     <tag>         <tag-name>login-form</tag-name>         <source>tags/login-form.xhtml</source>     </tag> </facelet-taglib> 

web-inf/tags/login-form.xhtml:

<ui:composition     xmlns="http://www.w3.org/1999/xhtml"     xmlns:c="http://java.sun.com/jsp/jstl/core"     xmlns:f="http://xmlns.jcp.org/jsf/core"     xmlns:h="http://xmlns.jcp.org/jsf/html"     xmlns:ui="http://xmlns.jcp.org/jsf/facelets">      test tag  </ui:composition> 

index.xhtml:

... <html xmlns="http://www.w3.org/1999/xhtml"          xmlns:h="http://java.sun.com/jsf/html"       xmlns:ui="http://java.sun.com/jsf/facelets"       xmlns:fmk="http://famake.com/jsf/facelets">     <h:body>         <h1>custome tags in jsf 2.0</h1>         <fmk:login-form/>     </h:body> </html> 

i don't understand why glassfish can't find login-form.xhtml . have tried different paths , tried strace'ing glassfish, without sensible results... ideas wrong?

the problem in server configuration. couldn't find cause, worked on different glassfish instance, deleted domain , re-created it. sorry couldn't find more specific.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -