Search |
||
Another Small Step for JSF...Posted by cayhorstmann on October 19, 2009 at 11:56 AM PDT
In the relentless fight against configuration boilerplate, JSF and Glassfish have taken yet another small step forward. As of Glassfish v3 build 68, you no longer need to declare the faces-servlet in WEB.XML. <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping>
In fact, you can omit web.xml altogether, except then you don't get to set GlassFish automatically provides a JSF servlet mapping for the
Isn't it grand? Now you can have a JSF app without web.xml or faces-config.xml, just a bunch of .xhtml pages and Java classes annotated with The only fly in the ointment is that, if you really want to be thoroughly modern and use web beans, erm, JSR 299 Contexts and Dependency Injection, then you should still leave something in place to trigger the servlet mapping. Another nifty step forward: NetBeans 6.8 Milestone 2 now does autocompletion on JSF 2.0 facelets pages, including tags, attributes and even EL expressions. For example, here, Netbeans has found a
It might be a good idea to filter out the useless After EE5 came out, I did all my EE development in Netbeans. It gave me one-stop shopping, bundling everything that I needed in a single download. I moved to Eclipse when Netbeans couldn't deal with EE6 improvements such as the simplified packaging. It worked in Eclipse (out of ignorance, not some grand plan), and that's what I used for the last 12 months or so. I was reasonably satisfied, thanks to the Glassfish Eclipse plugin, but Eclipse's support for editing JSF pages is extremely basic. Now I am very tempted to go back to Netbeans—I am a sucker for autocompletion. »
Comments
Comments are listed in date ascending order (oldest first)
eclipse & auto-completion
Submitted by rsitze on Fri, 2009-11-13 19:29.
I'm new to JSF, and using Eclipse 3.5 / Galileo. I get auto-completion from the 'Web Page Editor'. You can 'Open With' or go to preferences / general / editor / file associations to set the 'Web Page Editor' as default for jsf / jsp files.
regards,
|
||
|
|
Core JavaServer Faces update?