aspose file tools*
The moose likes JSF and the fly likes inputCalendar - absolute uri problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "inputCalendar - absolute uri problem" Watch "inputCalendar - absolute uri problem" New topic
Author

inputCalendar - absolute uri problem

madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
Hi there,
I am trying to use the MyFaces extension component <t:inputCalendar> in my application.
I have the tag lib included as


I have the extensions filter implemented in my web.xml file as


I have the tomahawk.jar included in my classpath.

The problem is: I get the following


Can anybody help me with this? Am I missing out something?

Regards,
Madhuri


~Madhuri
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1373
Whether Apache MyFaces supports only JSF pages ? Is it support JSP pages?
madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
Hi there,
Whether Apache MyFaces supports only JSF pages ? Is it support JSP pages?


Your question is not clear. Could you please throw more light on it?

FYI,
The app server I am using is JBoss and I am able to use the myfaces basic components.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16068
    
  21

Originally posted by kri shan:
Whether Apache MyFaces supports only JSF pages ? Is it support JSP pages?


JSF pages are jsp pages.

This error can occur because either:

A) the tomahawk jar is not in the webapp's WEB-INF/libs directory

B) The URI in the TLD in the tomahawk jar doesn't match the requested URI (http://myfaces.apache.org/tomahawk)

C) The tomahawk jar doesn't contain a TLD (though that isn't likely).


Customer surveys are for companies who didn't pay proper attention to begin with.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Tim Holloway:
JSF pages are jsp pages.


Or more correctly, JSP pages are a (the most common?) way to define JSF pages.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
Originally posted by Tim Holloway:


JSF pages are jsp pages.

This error can occur because either:

A) the tomahawk jar is not in the webapp's WEB-INF/libs directory

B) The URI in the TLD in the tomahawk jar doesn't match the requested URI (http://myfaces.apache.org/tomahawk)

C) The tomahawk jar doesn't contain a TLD (though that isn't likely).




I did not have the tomahawk jar in the webapp's WEB-INF/lib directory. After having the jar in place, I get this new exception.

[CODE] ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException
at org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.java:45)
at org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator(HtmlRendererUtils.java:462)
at org.apache.myfaces.custom.date.HtmlDateRenderer.encodeEnd(HtmlDateRenderer.java:82)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:2
madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
Originally posted by Tim Holloway:


JSF pages are jsp pages.

This error can occur because either:

A) the tomahawk jar is not in the webapp's WEB-INF/libs directory

B) The URI in the TLD in the tomahawk jar doesn't match the requested URI (http://myfaces.apache.org/tomahawk)

C) The tomahawk jar doesn't contain a TLD (though that isn't likely).




I did not have the tomahawk jar in the webapp's WEB-INF/lib directory. After having the jar in place, I get this new exception.

[CODE] ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.ClassCastException
at org.apache.myfaces.config.MyfacesConfig.getCurrentInstance(MyfacesConfig.java:45)
at org.apache.myfaces.renderkit.html.HtmlRendererUtils.writePrettyLineSeparator(HtmlRendererUtils.java:462)
at org.apache.myfaces.custom.date.HtmlDateRenderer.encodeEnd(HtmlDateRenderer.java:82)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:349)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:253)
at org.apache.jsp.dateCalendar_jsp._jspx_meth_t_inputDate_0(org.apache.jsp.dateCalendar_jsp:176)
at org.apache.jsp.dateCalendar_jsp._jspx_meth_h_form_0(org.apache.jsp.dateCalendar_jsp:146)
at org.apache.jsp.dateCalendar_jsp._jspx_meth_f_view_0(org.apache.jsp.dateCalendar_jsp:113)
at org.apache.jsp.dateCalendar_jsp._jspService(org.apache.jsp.dateCalendar_jsp:78)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
madhuri madhuri
Ranch Hand

Joined: Jan 18, 2006
Posts: 58
For some reason, looks like the entire reply is not posted.... !!

Here is my jsf code:



Any help would be appreciated.

Thanks and regards,
Madhuri
Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
Can you please post the code for the backing bean? That may shed some light...

Cheers!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16068
    
  21

JSF pages usually are JSP pages. The can be things like WAP.

But, in this case, not.

I found this in my web.xml:


<listener><!-- Attach myfaces factory to the servlet -->
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>


I know that there's an extra item of context that MyFaces requires or a few of the components won't work right, and it's either this one or the html.util.extensionsFilter. I just forget which. It's documented on the myFaces website (though easy to miss).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inputCalendar - absolute uri problem