JSF Trinidad Chart does not display

492 views Asked by At

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/%[email protected]%3E

But I still don't know how to make it work. Any suggestion will be appreciated

Thanks

1

There are 1 answers

1
Jasper de Vries On BEST ANSWER

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>