Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty WTP Plugin/Jetty WTP Create Server"

m
m
Line 12: Line 12:
 
<li>In the ''Wizards'' list box, scroll down to select '''Server -> Server'''.
 
<li>In the ''Wizards'' list box, scroll down to select '''Server -> Server'''.
 
<li>Click '''Next'''. The ''Define a New Server'' dialog box opens.
 
<li>Click '''Next'''. The ''Define a New Server'' dialog box opens.
 +
</li>
  
  
Line 17: Line 18:
  
  
# In the ''Select the server type'' field, scroll down to select '''Jetty -> Jetty 7.x''' or '''Jetty 8.x Server'''. This document uses the Jetty 7.x Server.
+
<li>In the ''Select the server type'' field, scroll down to select '''Jetty -> Jetty 7.x''' or '''Jetty 8.x Server'''. This document uses the Jetty 7.x Server.
# Click '''Next'''. The ''Jetty Server'' dialog box opens.
+
<li>Click '''Next'''. The ''Jetty Server'' dialog box opens.
   
+
  </li>
  
[[Image:Jetty-wtp-create3.jpg]]
 
  
To specify the installation directory for Jetty, either use the '''Browse''' button OR click '''Download and Install''' to download  Jetty v7. This document illustrates the latter option. The ''Download and Install'' dialog box opens.
 
  
[[Image:Jetty-wtp-create4.jpg]]
+
</li>[[Image:Jetty-wtp-create3.jpg]]
  
Accept the license and click '''Finish'''. You return to the Jetty Server dialog box.
 
  
[[Image:Jetty-wtp-create5.jpg]]
+
<li>To specify the installation directory for Jetty, either use the '''Browse''' button OR click '''Download and Install''' to download  Jetty v7. This document illustrates the latter option. The ''Download and Install'' dialog box opens.
 +
</li>
  
#Select the base directory where you want to install the Jetty server.
 
*This example selects D:\Servers\jetty-distribution-7.2.x and the download places the stable Jetty v7 server in this folder.
 
*Once you select a folder, the download begins.
 
*You have an error because the wizard checks that start.jar exists in the D:\Server\jetty-distribution-7.2.x (this JAR doesn't exist because the download  is not finished).  In some cases the download is slow.
 
  
#When the download completes, click the newly enabled '''Finish''' button. You now have a D:\Server\jetty-distribution-7.2.x directory that contains the start.jar...from Jetty 7 :
+
</li>[[Image:Jetty-wtp-create4.jpg]]
  
[[Image:Jetty-wtp-create6.jpg]]
 
  
Click '''Next'''. The Add and Remove dialog boxopens.  
+
<li>Accept the license and click '''Finish'''. You return to the Jetty Server dialog box.  
 +
</li>
  
[[Image:Jetty-wtp-create7.jpg]]
+
 
 +
</li>[[Image:Jetty-wtp-create5.jpg]]
 +
 
 +
 
 +
<li>Select the base directory where you want to install the Jetty server.
 +
</li>This example selects D:\Servers\jetty-distribution-7.2.x and the download places the stable Jetty v7 server in this folder.
 +
</li>Once you select a folder, the download begins.
 +
</li>You have an error because the wizard checks that start.jar exists in the D:\Server\jetty-distribution-7.2.x (this JAR doesn't exist because the download  is not finished).  In some cases the download is slow.
 +
 
 +
<li>When the download completes, click the newly enabled '''Finish''' button. You now have a D:\Server\jetty-distribution-7.2.x directory that contains the start.jar...from Jetty 7 :
 +
</li>
 +
 
 +
 
 +
</li>[[Image:Jetty-wtp-create6.jpg]]
 +
 
 +
<li>Click '''Next'''. The ''Add and Remove'' dialog boxopens.
 +
 
 +
</li>[[Image:Jetty-wtp-create7.jpg]]
  
  
Line 48: Line 60:
 
Here you can select an existing Dynamic Web project from your workspace. In this example, there are no WTP Dynamic WebProjects.  
 
Here you can select an existing Dynamic Web project from your workspace. In this example, there are no WTP Dynamic WebProjects.  
  
Click '''Finish'''.  
+
<li>Click '''Finish'''.  
 +
</ol>
  
 
* A Server Project is created in the workspace  
 
* A Server Project is created in the workspace  
Line 60: Line 73:
 
* the jetty*.xml files, which are declared in the original start.ini. Jetty*.xml files are preprocessed too to transform <Property to <SystemProperty.
 
* the jetty*.xml files, which are declared in the original start.ini. Jetty*.xml files are preprocessed too to transform <Property to <SystemProperty.
 
* webdefault.xml is modified to avoid locking HTML files under Windows when Jetty is started and HTML files are modified (published) with the following option:
 
* webdefault.xml is modified to avoid locking HTML files under Windows when Jetty is started and HTML files are modified (published) with the following option:
</ol>
+
 
  
 
<source lang="xml">
 
<source lang="xml">
Line 69: Line 82:
 
</source>
 
</source>
  
When Jetty server is called it uses:  
+
When the Jetty server is called it uses:  
 
* -Djetty.home : which is the WTP folder.
 
* -Djetty.home : which is the WTP folder.
 
* -Dinstall.jetty.home : which is the Jetty install folder.
 
* -Dinstall.jetty.home : which is the Jetty install folder.

Revision as of 13:21, 18 November 2010


To create a Jetty Server entry, complete the following steps.

  1. From the main Eclipse window, select File -> New -> Other. The Select a Wizard dialog box opens.

  2. Jetty-wtp-create1.jpg


  3. In the Wizards list box, scroll down to select Server -> Server.
  4. Click Next. The Define a New Server dialog box opens.

  5. Jetty-wtp-create2.jpg


  6. In the Select the server type field, scroll down to select Jetty -> Jetty 7.x or Jetty 8.x Server. This document uses the Jetty 7.x Server.
  7. Click Next. The Jetty Server dialog box opens.

  8. Jetty-wtp-create3.jpg


  9. To specify the installation directory for Jetty, either use the Browse button OR click Download and Install to download Jetty v7. This document illustrates the latter option. The Download and Install dialog box opens.

  10. Jetty-wtp-create4.jpg


  11. Accept the license and click Finish. You return to the Jetty Server dialog box.

  12. Jetty-wtp-create5.jpg


  13. Select the base directory where you want to install the Jetty server.
  14. This example selects D:\Servers\jetty-distribution-7.2.x and the download places the stable Jetty v7 server in this folder. Once you select a folder, the download begins. You have an error because the wizard checks that start.jar exists in the D:\Server\jetty-distribution-7.2.x (this JAR doesn't exist because the download is not finished). In some cases the download is slow.
  15. When the download completes, click the newly enabled Finish button. You now have a D:\Server\jetty-distribution-7.2.x directory that contains the start.jar...from Jetty 7 :

  16. Jetty-wtp-create6.jpg
  17. Click Next. The Add and Remove dialog boxopens.
  18. Jetty-wtp-create7.jpg


    Here you can select an existing Dynamic Web project from your workspace. In this example, there are no WTP Dynamic WebProjects.

  19. Click Finish.
  • A Server Project is created in the workspace
  • if you go to WTP Server View , you see the option to launch Jetty v7.0 Server at localhost, which you can use to start/stop/debug the installed Jetty server.

Jetty-wtp-create8.jpg

The Servers folder includes the Jetty v7.0 Server at localhost-config folder, which contains:

  • start.ini from the Jetty install (D:\Servers\jetty-distribution-7.2.x)
  • start.config from the JAR start.jar from the Jetty install. Notice that Server/start.config is not the same as Jetty install/start.jar. Jetty Home is not the Jetty Install server but a WTP folder (created in the .metadata of your workspace).
  • the jetty*.xml files, which are declared in the original start.ini. Jetty*.xml files are preprocessed too to transform <Property to <SystemProperty.
  • webdefault.xml is modified to avoid locking HTML files under Windows when Jetty is started and HTML files are modified (published) with the following option:


  <init-param>
    <param-name>useFileMappedBuffer</param-name>
    <param-value>false</param-value>
  </init-param>

When the Jetty server is called it uses:

  • -Djetty.home : which is the WTP folder.
  • -Dinstall.jetty.home : which is the Jetty install folder.

Back to the top