Dear Wiki user,

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

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

------------------------------------------------------------------------------
  
  ''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`.''
  
+ === 5. Define Tapestry XML DTD Location ===
+  Registering the Tapestry XML DTD allows <ctrl>+<space> auto-completion when 
editing tapestry files
+  
+  * In '''Preferences''' go to '''Web and XML > XML Catalog'''
+    Highlight '''User Specified Entries'''
+    Click '''Add...'''
+    Click on the folder icon to the right of the '''URI''' field.
+    Choose '''File System...'''
+    Browse to and select the tapestry jar file
+    Now, you need to manually edit the '''URI''' field as follows.
+ 
+  * 5.1. You will have a full path to the tapestry jar, preceeded by
+    `file:///`.  Change this to `jar:file:`
+  * 5.2. Now, move the carat (thing showing you where you are typing) to the 
right of the field.
+    You should see something like '''Tapestry_4.1.2.jar'''.
+  * 5.3. Directly after '''Tapestry_4.1.2.jar''', type 
`!/org/apache/tapestry/parse/Tapestry_4_0.dtd`.
+    Note that it is case sensitive.  N.B. For reference, this step just tells 
eclipse where the dtd is
+    located within the jar file.
+  * 5.4. Ensure that the '''Key Type''' field is set to '''Public ID'''
+  * 5.5. Set the '''Key''' field.  The value in here comes from somewhere near 
the top of the dtd file we referenced
+    in step 3, and in my case, I found this to be
+    `-//Apache Software Foundation//Tapestry Specification 4.0//EN`
+    N.B. This is all case sensitive too
+  * 5.6. Click '''OK'''
+  * 5.7. Now, look at the new entry that has appeared under '''User Specified 
Entries'''.  If it has 
+    a red cross next to it, then it means that the DTD could not be found at 
that location, so the thing to do
+    is to open the jar file with winzip (or whatever zip program you normally 
use), and see where the DTD really
+    is.  After establishing where the DTD is, go back to step 5.3, and modify 
the path as appropriate.
+ 
+   Note : I removed all instance of '`%20`' and replaced them with a '` `' in 
step 5.3 because that was what
+   I saw was in the other examples on that setting page, though I did not 
check if this was required.
+  
+ 
- === 5. Define a Server Runtime ===
+ === 6. Define a Server Runtime ===
  This tells Eclipse where Tomcat is installed. 
  
   * In '''Preferences''' go to '''Server  > Installed Runtime'''
@@ -77, +110 @@

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

  
  attachment:ServersProject.gif
  
- === 7. Disable Caching of Tapestry files ===
+ === 8. 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. 
+  * Double-click the server instance 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
  attachment:ServerArguments.gif
  
- === 8. Create a Dynamic Web Project ===
+ === 9. 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'''
@@ -112, +145 @@

  
  ''Note: You can open the '''J2EE''' perspective later via '''Window > Open 
Perspective > Other...'''''
  
- === 9. Add Tapestry libraries to the project ===
+ === 10. 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`)
@@ -121, +154 @@

  
  WTP automatically adds the libraries to the build path and publishes them for 
Tomcat to use. 
  
- === 10. Setup a Skeleton Site ===
+ === 11. Setup a Skeleton Site ===
  Creating Tapestry specification files is easy using the XML templates we 
defined previously. 
  
   * Create an empty file (e.g. `Home.page`)
@@ -144, +177 @@

  attachment:Home.java
   * Select your project and '''File > Refresh'''
  
- === 11. Attach Project to Server Instance ===
+ === 12. Attach Project to Server Instance ===
  
   * Select the server instance you defined in the '''Servers''' view
   * Right-click and select '''Add and Remove Projects...'''

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

Reply via email to