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 1: Line 1:
 
{{Jetty}}
 
{{Jetty}}
  
The following steps describe how to create the Jetty Server entry.
+
The following steps describe how to create a Jetty Server entry.
  
  
# To create a WTP Jetty/Server, from the main Eclipse window, select File -> New -> Other. The Select a Wizard window opens.
+
# From the main Eclipse window, select '''File -> New''' -> Other. The ''Select a Wizard'' window opens.
# In the Wizards list box, scroll down to select Server -> Server.
+
# In the Wizards list box, scroll down to select S'''erver -> Server'''.
# Click Next. The Define a New Server dialog box opens.
+
# Click Next. The ''Define a New Server'' dialog box opens.
  
  
 
[[Image:Jetty-wtp-create1.jpg]]
 
[[Image:Jetty-wtp-create1.jpg]]
  
# 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.
+
# 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.
+
# Click '''Next'''.
 
[[Image:Jetty-wtp-create2.jpg]]
 
[[Image:Jetty-wtp-create2.jpg]]
  
=== Step 3 ===
+
 
Click on Next button, now you must specify the installation directory for Jetty. Use Browse button to do that OR click on Download and Install... button to download the Jetty v7. In this documentation, we will do that. :
+
# Click the '''Next''' button.
 +
# 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.  
  
 
[[Image:Jetty-wtp-create3.jpg]]
 
[[Image:Jetty-wtp-create3.jpg]]
  
=== Step 4 ===
+
 
Click on Download and Install... the dialog opens :
+
Click Download and Install... the dialog opens :
  
 
[[Image:Jetty-wtp-create4.jpg]]
 
[[Image:Jetty-wtp-create4.jpg]]
  
=== Step 5 ===
+
# Accept the license and click '''Finish'''. Select the base directory where you want 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.  
 
+
Accept the license and click on Finish button. Select the base directory where you wish install the Jetty. In this example we have selected D:\Servers\jetty-distribution-7.2.x and the download will place the stable Jetty v7 server in this folder.  
+
  
 
[[Image:Jetty-wtp-create5.jpg]]
 
[[Image:Jetty-wtp-create5.jpg]]
  
Once you have selected a folder, download is processed. You have an error because the wizard check that start.jar exist in the D:\Server\jetty-distribution-7.2.x (this JAR doesn't exist because the download  is not finished).  
+
Once you have selected 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.
  
In some cases the download is slow.  Regardless, wait for Finish button to be enabled. Once the download is complete the Finish button will be enabled and you may continue.
+
# When the download completes, click the enabled '''Finish''' button. You now have a D:\Server\jetty-distribution-7.2.x directory that contains the start.jar...from Jetty7 :
 
+
=== Step 6 ===
+
 
+
Once download is finished, you will have a D:\Server\jetty-distribution-7.2.x directory which contains tje start.jar...from Jetty7 :
+
  
 
[[Image:Jetty-wtp-create6.jpg]]
 
[[Image:Jetty-wtp-create6.jpg]]
  
 
+
Click '''Next'''. The      window opens.  
=== Step 7 ===
+
Click on Next button, here you can select an existing Dynamic Web project from your workspace. In this documentation, there are no WTP Dynamic WebProject.  
+
  
 
[[Image:Jetty-wtp-create7.jpg]]
 
[[Image:Jetty-wtp-create7.jpg]]
  
  
=== Step 8 ===
 
  
Click on Finish button :
+
In this window, you can select an existing Dynamic Web project from your workspace. In this example, there are no WTP Dynamic WebProjects.
 +
Click '''Finish'''.
  
 
* A Server Project is created in the workspace  
 
* A Server Project is created in the workspace  
* if you go at WTP Server View , you will see the option to launch Jetty v7.0 Server at localhost that you can use to start/stop/debug the installed Jetty server.
+
* 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.
  
 
[[Image:Jetty-wtp-create8.jpg]]
 
[[Image:Jetty-wtp-create8.jpg]]
  
Servers contains the Jetty v7.0 Server at localhost-config folder which contain:  
+
Servers shows the Jetty v7.0 Server at localhost-config folder which contains:  
 
* start.ini coming from the Jetty install (D:\Servers\jetty-distribution-7.2.x)
 
* start.ini coming from the Jetty install (D:\Servers\jetty-distribution-7.2.x)
* start.config : coming from the JAR start.jar  from the Jetty install. You can notice Server/start.config is not the same than Jetty install/start.jar. Jetty Home is not the Jetty Install server but a WTP folder (created in the .metadata of your workspace).  
+
* start.config : coming 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.
 
* 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 option :
+
* webdefault.xml is modified to avoid locking HTML files under Windows when Jetty is started and HTML files are modified (published) with the option :
  
 
<source lang="xml">
 
<source lang="xml">

Revision as of 12:11, 18 November 2010



The following steps describe how to create a Jetty Server entry.


  1. From the main Eclipse window, select File -> New -> Other. The Select a Wizard window opens.
  2. In the Wizards list box, scroll down to select Server -> Server.
  3. Click Next. The Define a New Server dialog box opens.


Jetty-wtp-create1.jpg

  1. 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.
  2. Click Next.

Jetty-wtp-create2.jpg


  1. Click the Next button.
  2. 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.

Jetty-wtp-create3.jpg


Click Download and Install... the dialog opens :

Jetty-wtp-create4.jpg

  1. Accept the license and click Finish. Select the base directory where you want 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.

Jetty-wtp-create5.jpg

Once you have selected 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.

  1. When the download completes, click the enabled Finish button. You now have a D:\Server\jetty-distribution-7.2.x directory that contains the start.jar...from Jetty7 :

Jetty-wtp-create6.jpg

Click Next. The window opens.

Jetty-wtp-create7.jpg


In this window, you can select an existing Dynamic Web project from your workspace. In this example, there are no WTP Dynamic WebProjects. 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

Servers shows the Jetty v7.0 Server at localhost-config folder which contains:

  • start.ini coming from the Jetty install (D:\Servers\jetty-distribution-7.2.x)
  • start.config : coming 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 option :
  <init-param>
    <param-name>useFileMappedBuffer</param-name>
    <param-value>false</param-value>
  </init-param>

When 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