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

The comment on the change is:
added Tapestry templates

------------------------------------------------------------------------------
   * Server context reloads automatically when Java source files change (often 
faster than a full server restart)
   * Tomcat installation is not modified
   * Content assist and validation in XML editors of elements and attribute 
names (i.e. HTML templates, application, page & component specifications).      
   
+  * Can define Templates for common Tapestry files
   * Debugger ''just works'' for deployed code
-  * Works with Tapestry 4 (Spindle was not available at time of writing)
  
  ''Note: for some reason content assist does not work with the application 
specification. It is validated however.''
  
@@ -56, +56 @@

   * Select add `.project`, `.page`, `.jwc` and `.library` extensions to the 
'''Text''' > '''XML''' node
  attachment:ContentTypes.gif
  
+ === 4. Define XML templates ===
+  * Download attachment:templates.xml
+  * In '''Preferences''' go to '''Web and XML > XML Files > XML Templates'''
+  * Click '''Import''' and select `templates.xml`
+ attachment:XMLTemplates.gif
+  * Click '''OK''' to close the '''Preferences''' dialog
+ 
+ ''Note: these templates are configured to be available in empty files. You 
can make them available in any XML file by editing the template and changing 
'''Context''' to `All XML`.''
+ 
- === 4. Define a Server Runtime ===
+ === 5. Define a Server Runtime ===
  This tells Eclipse where Tomcat is installed. 
  
   * '''Window''' > '''Preferences...'''
@@ -69, +78 @@

   * Click '''Finish'''
   * Click '''OK''' to close the Preferences dialog
  
- === 5. Define a Server Instance ===
+ === 6. Define a Server Instance ===
   * '''Window''' > '''Show View''' > '''Other'''
   * Open the '''Server''' > '''Servers''' view
   * Right click in the '''Servers''' view and select '''New > Server...'''
@@ -86, +95 @@

  
  ''It also creates a new '''Run''' configuration. You can ignore this, but 
don't delete it--it is used to save VM arguments.''
  
- === 6. Disable Caching of Tapestry files ===
+ === 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. 
@@ -96, +105 @@

   * Add `-enableassertions` if you use assertions
  attachment:ServerArguments.gif
  
- === 7. Create a Dynamic Web Project ===
+ === 8. Create a Dynamic Web Project ===
  The Dynamic Web Project is a part of WTP. It adds automatic deployment 
support. 
   * '''File > New > Project'''
   * '''Web > Dynamic Web Project'''
@@ -106, +115 @@

  
  ''Note: You can open the '''J2EE''' perspective later via '''Window > Open 
Perspective > Other...'''''
  
- === 8. Add Tapestry libraries to the project ===
+ === 9. Add Tapestry libraries to the project ===
  ''Note: I was unable to employ the '''user library''' approach for adding 
Tapestry libraries to the project. Tapestry was not loaded at runtime''
  
   * Go to the `lib` directory of your Tapestry installation (e.g. 
`D:\tools\tapestry-4.0\ext-package\lib`)
@@ -115, +124 @@

  
  WTP automatically adds the libraries to the build path and publishes them for 
Tomcat to use. 
  
- === 9. Setup a Skeleton Site ===
+ === 10. Setup a Skeleton Site ===
- Unfortunately we don't have Spindle to create the skeleton files for us. 
Below are the files used in this How-To. 
+ Creating Tapestry specification files is easy using the XML templates we 
defined previously. 
  
+  * Create an empty file (e.g. `Home.page`)
+  * Click in the editor and Press '''Alt-Enter'''
+  * And select the template you want (e.g. `page spec`). 
+ attachment:ContentAssistPageSpec.gif
+ 
+ Below are the files for the ''Hello World'' application used in the rest of 
this How-To. You can download these or re-create them from scratch. 
+ 
-  * Download and copy these files to the `WebContent/WEB-INF/` directory
+  * Put these files in the `WebContent/WEB-INF/` directory
  attachment:web.xml
  
  attachment:TapestryTest.application
@@ -127, +143 @@

  
  attachment:Home.page
  
-  * Download and copy this Java file to the `src` directory
+  * Put this Java file in the `src` directory
  attachment:Home.java
   * '''File > Refresh'''
  
- === 10. Attach Project to Server Instance ===
+ === 11. Attach Project to Server Instance ===
  
   * Select the server instance you defined in the '''Servers''' view
   * Right-click and select '''Add and Remove Projects...'''
@@ -173, +189 @@

   * Stop the server
  attachment:StopServer.gif
   * '''Project > Clean...'''
- attachment:CleanBuildDialog.gif
- 
- === Manually inspect contents of .deployables directory ===
- ''''TODO: update for WTP 1.0''''
- 
- This is your ''live'' directory. It is where Tomcat loads the site from. 
- Sometimes it may become unsynchronized (particularly if you mondify a jar). 
-  * '''Window > Open Perspective > Other...'''
-  * Select the '''Resource''' perspective
-  * Look in the `.deployables` directory and ensure all the needed files are 
present
  
  === Relaunch Eclipse ===
   * '''File > Switch Workspace'''
   * Press '''OK'''
  Eclipse will restart and reload your current workspace
+ 
+ === Inspect the contents of the temporary deployment directory ===
+ During a build, WTP copies all deployable resources to a temporary directory. 
Tomcat loads the site from here. Sometimes it may become unsynchronized 
(particularly if you modify a jar while the server is running). Doing a clean 
build and restarting the workspace should take care of any synchronizing 
problems you have. But if you're still having problems you can examine the 
deployment directory. 
+ 
+  * If you look in the console you should see a message like this" `INFO: 
Installing web application at context path  from URL 
file:D:\TapestryDemo\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\ROOT`.
+  * Go to the file system and ensure all the needed files are present
  
  == Solutions to specific problems ==
  === A change in a specification file does not appear in the browser ===

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to