JSF Trinidad Chart does not display
سؤال
Environment: JSF2.0 + MyFace + Trinidad + GlassFish ,IDE: eclipse
I am very new to JSF and currently I want to display Trinidad Chart on my pages but fail to do it. I can display other Trinidad components panelFormLayout like but shows following errors on browser.
Uncaught ReferenceError: ApacheChart is not defined
And Fail to load4 resourse (404)
://.../adf/jsLibs/resources/LocaleElements_zh_TW2_0_0_beta_2.js; ://.../adf/jsLibs/resources/DebugLocale2_0_0_beta_2.js; ://.../adf/jsLibs/resources/DebugCoreFmt2_0_0_beta_2.js; ://.../adf/jsLibs/resources/DebugApacheChart2_0_0_beta_2.js;
I have found my problem is very like this one
But I still don't know how to make it work. Any suggestion will be appreciated
Thanks
المحلول
It looks like the ADF resources servlet is missing in your web.xml
.
<servlet>
<servlet-name>resources</servlet-name>
<servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>resources</servlet-name>
<url-pattern>/adf/*</url-pattern>
</servlet-mapping>