Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

inputCalendar - absolute uri problem

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether Apache MyFaces supports only JSF pages ? Is it support JSP pages?
 
madhuri madhuri
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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).
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
madhuri madhuri
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post the code for the backing bean? That may shed some light...

Cheers!
 
Tim Holloway
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
There’s no place like 127.0.0.1. But I'll always remember this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic