سؤال

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

http://mail-archives.apache.org/mod_mbox/myfaces-users/200707.mbox/%3Cfa024af00707161819h4f93034fj1ec2574f4f38918c@mail.gmail.com%3E

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>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top