开发者

JSF 2.0 Using Eclipse? [duplicate]

开发者 https://www.devze.com 2023-01-07 20:35 出处:网络
This question already has an answer here: EL proposals / autocomplete / code assist in Facelets with Eclipse
This question already has an answer here: EL proposals / autocomplete / code assist in Facelets with Eclipse (1 answer) Closed 7 years ago.

I am using JSF 2.0 with ec开发者_如何学编程lipse 3.4 and Tomcat6. For Facelets I need to create XHTML files. Now the problem is that there is no XHTML file in eclipse. I can make it using a new and convert its etension XHTML but i am coding it is not showing any tags in autocomplete. In JSP file when I write <h: it shows all relevant tags of and same for <f: but not in XHTML file. Which one I make using new file in Eclipse please tell me how it show also all tags which relevant to <h: and any other.


  1. You need Eclipse for Java EE developers (note the EE). It not only includes WTP with JSF tooling, but also much more, like a builtin database manager, JPA assist, etc.

  2. As Facelets is relatively new, there's no builtin support for this yet. To get autocompletion to work for Facelets files anyway, go to Window > Preferences > General > Content Types > Text > JSP and then add *.xhtml as file association and set default encoding to UTF-8.

    Update: Since Eclipse 3.6 there's builtin support for Facelets files. Further, the Glassfish server plugin and the Jboss Tools plugin also ships with more advanced Facelets support. The Jboss Tools plugin even comes with EL autocompletion and linking with right managed bean classes.


create new > others> web> html> click next enter file name with extension .xhtml >finish

0

精彩评论

暂无评论...
验证码 换一张
取 消