tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-tapestry Wiki] Trivial Update of "HowToSetupEclipseWtp" by MatGessel
Date Fri, 27 Jan 2006 01:14:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-tapestry Wiki" for change
notification.

The following page has been changed by MatGessel:
http://wiki.apache.org/jakarta-tapestry/HowToSetupEclipseWtp

------------------------------------------------------------------------------
   * Easy to use Eclipse debugger
   * Start, stop & restart web server within Eclipse
   * Auto-completion and validation in XML editors of elements and attribute names (i.e. HTML
templates, application, page & component specifications)
+  * Works with Tapestry 4 (Spindle was not available at time of writing)
  
  == Tested Configuration ==
  
@@ -19, +20 @@

   * Web Tools Platform 1.0
  
  == Steps ==
- === Installation ===
+ === 1. Installation ===
   * Install JDK 1.5.0 http://java.sun.com/j2se/1.5.0/download.jsp
   * Install Tomcat 5 http://tomcat.apache.org/download-55.cgi
   * Install and build Tapestry 4.0. See BuildingTapestry
   * Install Eclipse and Web Tools Platform. The easiest way is to grab the All-in-one download.
This contains Eclipse, WTP, EMF, GEF & JEM, all of which you need to run WTP. http://download.eclipse.org/webtools/downloads/drops/R-1.0-200512210855/
  
- === Launch Eclipse ===
+ === 2. Launch Eclipse ===
  Close the Welcome tab (you can get to it later by Help > Welcome
  
- === Define JDK ===
+ === 3. Define JDK ===
  Eclipse will launch with your machine's default JRE. Tomcat typically needs to launch from
the JDK (not sure if this is necessary for Tapestry). 
  
  '''Window''' > '''Preferences...'''
@@ -37, +38 @@

  
  Add JDK 1.5 if necessary ('''not''' JRE 1.5)
  
+ === 4. Associate Tapestry file extentions with XML editor ===
+ In '''Preferences''' go to '''General''' > '''Content Types'''
+ 
+ Select add `.project`, `.page`, `.jwc` and `.library` extensions to the '''Text''' >
'''XML''' node
+ 
+ http://www.asquare.net/images/WTPHowTo/ContentTypes.gif
+ 
- === Create a Server Runtime ===
+ === 5. Define a Server Runtime ===
  This tells Eclipse where Tomcat is installed. 
  
  '''Window''' > '''Preferences...'''
@@ -52, +60 @@

  
  Select JDK 1.5
  
+ http://www.asquare.net/images/WTPHowTo/TomcatServerRuntime.gif
+ 
  Click '''Finish'''
  
  Click '''OK''' to close the Preferences dialog
  
+ === 6. Define a Server Instance ===
- === Create a Server Configuration ====
- A better name would be "Launch Configuration". It is essentially the same as '''Run''' >
'''Run...'''
- 
  '''Window''' > '''Show View''' > '''Other'''
  
  Open the '''Server''' > '''Servers''' view
  
- Name the server
+ Right click in the '''Servers''' view and select '''New > Server...'''
+ 
+ http://www.asquare.net/images/WTPHowTo/NewServer.gif
  
  Select '''Apache > Tomcat v5.0 Server'''
  
- Select the runtime you created in the last step
+ Select the server runtime you created previously
+ 
+ http://www.asquare.net/images/WTPHowTo/NewServer2.gif
  
  And click '''Finish'''
  
- A side-effect of creating a Server Configuration is a new '''Servers''' project will be
created. 
+ You should now have a server in the '''Servers''' view
  
- MORE TO COME....
+ ''A side-effect of creating a Server Configuration is a new '''Servers''' project will be
created.''
  
+ http://www.asquare.net/images/WTPHowTo/ServersProject.gif
+ 
+ ''It also creates a new '''Run''' configuration. You can ignore this, but don't delete it--it
is used to save VM arguments.''
+ 
+ === 7. Disable Caching of Tapestry files ===
+ ''WTP does not automatically reload the context when page specifications and HTML templates
are changed. If you set the Tapestry flag to disable caching you don’t need to restart the
context to see changes.'' See http://jakarta.apache.org/tapestry/UsersGuide/configuration.html#N10106
+ 
+ Double-click the server insance you created previously to open it in the editor view. 
+ 
+ '''General > Open launch configuration'''
+ 
+ Select the '''Arguments''' tab
+ 
+ Add `-Dorg.apache.tapestry.disable-caching=true` to the '''VM arguments'''
+ 
+ Add `-enableassertions` if you use assertions
+ 
+ http://www.asquare.net/images/WTPHowTo/ServerArguments.gif
+ 
+ === 8. Create a Dynamic Web Project ===
+ '''File > New > Project'''
+ 
+ '''Web > Dynamic Web Project'''
+ 
+ http://www.asquare.net/images/WTPHowTo/NewDynamicWebProject.gif
+ 
+ Use defaults for rest of wizard and click ''Finish''
+ 
+ When the project is created you will be asked whether you want to open the ''J2EE'' perspective.
Click ''No''. 
+ ''Note: You can open the '''J2EE''' perspective later via '''Window > Open Perspective
> Other...'''
+ 
+ = TODO =
+ 
+ === 9. Create a Home Page ===
+ 
+ === 10. Add Tapestry libraries to the project ===
+ ''(Note: I was not able to get a Tapestry user library to be recognized at runtime)''
+ 
+ === 11. Attach Project to Server Instance ===
+ 
+ == Verification ==
+ Start server
+ 
+ Verify that caching of templates and specifications is disabled
+ 
+ Verify that context restarts automatically after modifying a Class file
+ 
+ == Troubleshooting ==
+ Stop server and do a clean build
+ 
+ Manually inspect contents of `.deployables` directory (use ''Resource'' perspective or browse
on file system)
+ 
+ Relaunch Eclipse
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message