4

PrimeFacesライブラリを設定してみました。そこで、「addexternaljar」コマンドを使用してprimefaces-3.4.1.jarを追加しました。名前空間を追加したよりも、xmlns:p = "http://primefaces.org/uiをhtmlタグに追加しました。公式ドキュメントによると、それを設定するためのすべてがあります。

<p:editor/>ページにコンポーネントを追加しようとしましたが、表示されません。

私のプロジェクト構成は次のとおりです。Eclipse、Glassfish3.1上のJSF2.1

4

3 に答える 3

4

Apparently you did the "add external jar" command wrong. It's not clear from the question how exactly you performed this step, but this should be just a matter of dropping the JAR file in its entirety in the project's /WEB-INF/lib folder the usual way (as you would do for every 3rd party JAR file the webapp depends on). The way you put the question indicates that you weren't aware about this after all.

Really nothing more needs to be done. If you have fiddled around in project's Build Path properties, then you should undo that all to avoid possible collisions in the future. Eclipse is smart enough to set the necessary things automatically right whenever you drop a JAR in projects's /WEB-INF/lib folder.

See also:

于 2012-10-31T01:18:29.123 に答える
3

これは同じ問題と解決策だと思います:単純なprimefacesアプリケーションが機能しない

web.xml にサーブレット マッピングがありません:

<servlet-mapping>
  <servlet-name>Faces Servlet</servlet-name>
  <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
于 2013-01-19T19:02:27.093 に答える