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 "Scout/Tutorial/3.8/Deploy to Tomcat"

< Scout‎ | Tutorial‎ | 3.8
(Export Scout Application to WAR File)
(removed bug notice because bug 378445 is "closed fixed")
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{ScoutPage|cat=Tutorial 3.8}}
 
{{ScoutPage|cat=Tutorial 3.8}}
 +
= Deploy a Scout Application to Tomcat =
  
{{note|Under construction|This page is under construction}}
+
This page shows how to export and deploy your Scout application to a Tomcat webserver using the Scout SDK.
  
=Deploy a Scout Application to Tomcat =
 
  
This page shows how to export and deploy your Scout application to a Tomcat webserver using the Scout SDK.
 
  
==Install Tomcat ==
+
 
 +
== Install Tomcat ==
 
If you have not yet installed Tomcat please go to the [http://tomcat.apache.org/ Tomcat homepage]. Then download and install Tomcat version 6 or 7 using the proposed default settings.
 
If you have not yet installed Tomcat please go to the [http://tomcat.apache.org/ Tomcat homepage]. Then download and install Tomcat version 6 or 7 using the proposed default settings.
 
Once you started the webserver you verify that its running by starting your browser with the address http://localhost:8080. Your browser should display some page similar as shown below.
 
Once you started the webserver you verify that its running by starting your browser with the address http://localhost:8080. Your browser should display some page similar as shown below.
<br/>[[Image:Tomcat_running.png|left]]
 
<br clear="all" />
 
  
==Export Scout Application to WAR File ==  
+
[[Image:Tomcat_running.png]]
 +
 
 +
 
 +
== Export Scout Application ==
  
 
In the Scout SDK perspective use the context menu ''''Export Scout Project ...'''' on the project node as shown below.
 
In the Scout SDK perspective use the context menu ''''Export Scout Project ...'''' on the project node as shown below.
  
<br/>[[Image:Scout-ExportWarFile.PNG|left]]
+
[[Image:Scout-ExportWarFile.PNG]]
<br clear="all" />
+
 
 +
This opens the ''Export a Scout Project'' dialog as shown below. For this tutorial we assume that you have all user interfaces in your project.
 +
 
 +
[[Image:Scout-ExportWarFile1.PNG]]
  
This opens the export dialog
+
In the first field we define in which directory the exported files will be stored.<br/>
 +
In the checkbox below we can also choose if we would like to create an [http://en.wikipedia.org/wiki/EAR_(file_format) EAR] containing all [http://en.wikipedia.org/wiki/WAR_(Sun_file_format) WAR] files. If this checkbox is ticked, all output WAR files will be packed together in a single EAR that can be deployed into an application server like [http://www.jboss.org/ JBoss]. If this checkbox remains unticked, each WAR file will be stored separately in the output folder defined above.<br/>
 +
In the list you can choose amongst the following export artifacts:
 +
* '''Server Web Application''': The server application will be exported. If a client is available, it is packed into the server as well and will be provided for download on the target URL where the resulting WAR file will be deployed.
 +
* '''Client Application''': The client application packed as ZIP file. The same client will be available for download on the server if ticked (see above).
 +
* '''RAP Web Application''': The RAP web UI application. After the deploy of this WAR file the web UI can be accessed using an URL like http://host:port/webappname/web
  
<br/>[[Image:Scout-ExportWarFile1.PNG|left]]
+
Depending on which elements are ticked you will have to specify the details in the next wizard pages.
<br clear="all" />
+
  
* '''Product file''': Server product to be deployed. This will usually be the production product (not the development product)
+
[[Image:Scout-ExportWarFile2.PNG]]
* '''WAR file''': Path to the ''webapps'' directory of your Tomcat installation followed by the WAR file name
+
* Checkbox '''Overwrite existing WAR file''': Replaces an existing WAR file (path, and file name as specified above)
+
  
<br/>
+
If the server is ticked as export artifact, you will have to define the WAR file name of the server application and choose which product you would like to export.elopment product)
* Checkbox '''Include client application''': Exports and packs the client application into the WAR file (see selection dialog below)
+
* '''Client product to include''': Client product to be included in the WAR file
+
  
<br/>[[Image:Export_to_war_client.png|left]]
+
[[Image:Scout-ExportWarFile3.PNG]]
<br clear="all" />
+
  
In the screenshot above we've selected the SWT client (production product) to be included in the WAR
+
If a client should be exported, you have to choose which client product to use (usually a ''production'' product should be selected). Furthermore you must define where the client should be stored to be available for download after the deploy.
  
==Restart Tomcat, View Application Home Page, Download Client ==
+
[[Image:Scout-ExportWarFile4.PNG]]
  
With autodeploy or restart of the Tomcat server we can access the application homepage under http://localhost:8080/documentApp/
+
If the ''RAP Web Application'' has been ticked as export artifact in the first step, we must specify now how the resulting WAR file should be named and which RAP product that should be exported.
  
<br/>[[Image:Scout_app_homepage.png|left]]
+
After pressing ''Finish'' the selected components will be exported to the target directory specified in the first step. As soon as the export as completed you can deploy the WAR files in the output directory to your Tomcat installation e.g. using the ''Manager App'' that is part of Tomcat: [http://localhost:8080/manager/ http://localhost:8080/manager/].
<br clear="all" />
+
  
By clicking on ''Download'' or ''documentApp.zip'' the Scout client can be downloaded from the webserver. To start the client follow the steps described on the application home page.
+
== Test the Application ==
  
==Deploy to remote host==
+
Now we can access the application homepage under http://localhost:8080/helloworld/
If your tomcat server is not at localhost, change the value ''server.url'' in the config.ini of the desired client e.g. ui.swt.production, like below:
+
  
  server.url=http:&#47;&#47;<host>:<port>/<project>/process
+
From there we can download the client application as ZIP file. After it has been extracted you can start the client. It will connect to the server that has just been deployed.
  
[[Image:RemoteTomcat.png]]
+
If you have also decided to export the RAP UI, you can deploy this WAR file the same way as for the server application. You should then be able to access the Web UI with the following URL: [http://localhost:8080/helloworld_web/web http://localhost:8080/helloworld_web/web]

Latest revision as of 08:36, 7 March 2013

The Scout documentation has been moved to https://eclipsescout.github.io/.

Deploy a Scout Application to Tomcat

This page shows how to export and deploy your Scout application to a Tomcat webserver using the Scout SDK.



Install Tomcat

If you have not yet installed Tomcat please go to the Tomcat homepage. Then download and install Tomcat version 6 or 7 using the proposed default settings. Once you started the webserver you verify that its running by starting your browser with the address http://localhost:8080. Your browser should display some page similar as shown below.

Tomcat running.png


Export Scout Application

In the Scout SDK perspective use the context menu 'Export Scout Project ...' on the project node as shown below.

Scout-ExportWarFile.PNG

This opens the Export a Scout Project dialog as shown below. For this tutorial we assume that you have all user interfaces in your project.

Scout-ExportWarFile1.PNG

In the first field we define in which directory the exported files will be stored.
In the checkbox below we can also choose if we would like to create an EAR containing all WAR files. If this checkbox is ticked, all output WAR files will be packed together in a single EAR that can be deployed into an application server like JBoss. If this checkbox remains unticked, each WAR file will be stored separately in the output folder defined above.
In the list you can choose amongst the following export artifacts:

  • Server Web Application: The server application will be exported. If a client is available, it is packed into the server as well and will be provided for download on the target URL where the resulting WAR file will be deployed.
  • Client Application: The client application packed as ZIP file. The same client will be available for download on the server if ticked (see above).
  • RAP Web Application: The RAP web UI application. After the deploy of this WAR file the web UI can be accessed using an URL like http://host:port/webappname/web

Depending on which elements are ticked you will have to specify the details in the next wizard pages.

Scout-ExportWarFile2.PNG

If the server is ticked as export artifact, you will have to define the WAR file name of the server application and choose which product you would like to export.elopment product)

Scout-ExportWarFile3.PNG

If a client should be exported, you have to choose which client product to use (usually a production product should be selected). Furthermore you must define where the client should be stored to be available for download after the deploy.

Scout-ExportWarFile4.PNG

If the RAP Web Application has been ticked as export artifact in the first step, we must specify now how the resulting WAR file should be named and which RAP product that should be exported.

After pressing Finish the selected components will be exported to the target directory specified in the first step. As soon as the export as completed you can deploy the WAR files in the output directory to your Tomcat installation e.g. using the Manager App that is part of Tomcat: http://localhost:8080/manager/.

Test the Application

Now we can access the application homepage under http://localhost:8080/helloworld/

From there we can download the client application as ZIP file. After it has been extracted you can start the client. It will connect to the server that has just been deployed.

If you have also decided to export the RAP UI, you can deploy this WAR file the same way as for the server application. You should then be able to access the Web UI with the following URL: http://localhost:8080/helloworld_web/web

Back to the top