Forwarding to user list, since that's where this discussion belongs. ;-)  If
you don't want to subscribe to all messages, you can use Nabble (
http://appfuse.org/forums) to subscribe to a single message.

Matt

---------- Forwarded message ----------
From: Ben Greenway <[EMAIL PROTECTED]>
Date: Feb 1, 2007 9:09 AM
Subject: Eclipse project resolving / completion
To: [EMAIL PROTECTED]

Hi Matt



Let me start by saying I am an IntelliJ fan that's forced to use eclipse.
(And the appfuse stuff worked straight out of the box with IntelliJ)



Now apart from the fact that I still have a number of  (stupid, tld not
resolving) errors being reported by eclipse, my main driver was to get (jsf)
code completion to work.



I tried using eclipse-wtp, easy-eclipse and myeclipse before commencing page
changes to check whether they revealed an easy option, but the all behaved
the same.



An outline that finally seems to work (or gets close)



To create the project I used the wtpversion tag:



mvn eclipse:eclipse -Dwtpversion=1.0



Ensure that after having done a mvn war:inplace that not all libs are
deleted.  Ie keep the jstl, standard and various other jars that contain the
tlds in the META-INF directory (like the ajax4jsf and the various jsf jars).



Now the other strange thing was that I had to use jsp:root rather than
html:xmlns.  I thought that jsp:root was an old way of doing it.  I also
tried adding the <is-xml> property to web.xml in the hope that it wouldn't
be needed but it didn't resolve, but ultimately eclipse did not behave for
code completion until jsp:root was in place!



I am unsure where to put this information for now, but wanted you at least
to be aware of it.



<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page";

     xmlns:ui="http://java.sun.com/jsf/facelets";

     xmlns:h="http://java.sun.com/jsf/html";

     xmlns:f="http://java.sun.com/jsf/core";

     version="2.0">



<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:c="
http://java.sun.com/jstl/core";

     xmlns:f="http://java.sun.com/jsf/core"; xmlns:h="
http://java.sun.com/jsf/html";

     xmlns:ui="http://java.sun.com/jsf/facelets"; xmlns:t="
http://myfaces.apache.org/tomahawk";

     xmlns:v="http://corejsf.com/validator";>









Resources:



http://www.mojavelinux.com/blog/archives/2006/12/facelets_tag_completion_in_eclipse/



http://www.thearcmind.com/confluence/display/SHJFT/Getting+started+with+JSF%2C+Facelets%2C+Eclipse+WTP+and+Tomcat#GettingstartedwithJSF,Facelets,EclipseWTPandTomcat-Createsomepages



http://www.onjava.com/pub/a/onjava/2004/04/21/JSP2part3.html







inside web.xml



<jsp-config>

   <jsp-property-group>

     <url-pattern>*.xhtml</url-pattern>

     <is-xml>true</is-xml>

   </jsp-property-group>

 </jsp-config>




--
http://raibledesigns.com

Reply via email to