Smart GWT EE Showcase
--------------------
The Smart GWT EE Showcase contains many easy-to-follow illustrations of
Smart GWT EE's capabilities, and highlights features unavailable in the free
Smart GWT package.


Using sample projects
---------------------
Note that the Showcase project is not a good starting point for building your
own application - pick one of the other sample projects and simply copy code
from the Showcase as needed. The Showcase is also not a good project for running
tools such as Visual Builder, because the Showcase intentionally cripples tools
so they are safe to show in a public demo.

Instructions are provided below for importing the sample project with Eclipse or
building it from the command line with Ant.

If you instead want to add Smart GWT EE to an existing project, see these
instructions:

   http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/SgwtEESetup.html

For instructions for launching tools such as the Developer Console, Visual
Builder or DataSource Wizards, see the SmartGWT FAQ:

   http://forums.smartclient.com/showthread.php?t=8159


Build Prerequisites
-------------------
- Google Web Toolkit, 2.12.1 or later
  https://developers.google.com/web-toolkit/download

  Ensure that the GWT_HOME environment variable is set to the location of your
  Google Web Toolkit SDK directory.

- If building with ant:
  Apache Ant, 1.6.5 or later (1.7.1 or later recommended)
  http://ant.apache.org/

  A copy of Ant is included in the Smart GWT distribution under the
  'apache-ant-1.7.1' directory.

  Ensure that the ANT_HOME environment variable is set to the location of your
  Apache Ant directory, and the 'ant' command is in your PATH.

- If building with Eclipse:
  GWT Eclipse Plugin (GEP)
  https://github.com/gwt-plugins/gwt-eclipse-plugin

  The GEP is highly recommended if using Eclipse. Its use is assumed in the
  instructions below.

  The Jetty Eclipse Plugin and a separate Jetty 11 installation
  https://marketplace.eclipse.org/content/eclipse-jetty
  https://jetty.org/download.html- 
  Note that the current Jetty Eclipse plugin may not work with Jetty 12.
  

Build and deployment using ant
------------------------------
- 'ant'
  Compile Showcase for deployment.

- 'ant war'
  Compile Showcase for deployment and bundle into showcase.war file.

  If you have a web container operating on localhost:8080, you can deploy
  showcase.war into the web container and access the Showcase at:

    http://localhost:8080/showcase/index.html


Super Development Mode
----------------------
Hosted Mode is being being phased out by GWT and replaced with Super Dev Mode.
You can find an overview of SDM at:

    http://www.gwtproject.org/articles/superdevmode.html

For more details about how to set up or use SDM, see our online Smart GWT SDM
Troubleshooting help topic at:

    http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/SuperDevModeTroubleshooting.html


Eclipse Configuration
---------------------
When using Servlet 5 and Jakarta, you cannot use the Jetty server built into GWT,
which complicates setup as you'll need to launch Jetty separately.  To open this
sample, configure Eclipse and GEP as follows:

- Set the Eclipse Classpath variable SGWTEE_HOME to point to the root directory
  of the Smart GWT EE distribution. This is configured through
    Windows: Window  -> Preferences -> Java -> Build Path -> Classpath Variables
    MacOS X: Eclipse -> Preferences -> Java -> Build Path -> Classpath Variables
  The included Eclipse project files load JARs from SGWTEE_HOME/lib.

- Set the Eclipse Classpath variable GWT_HOME to point to the root directory of
  your GWT SDK 2.12.x intallation.  This variable helps define the classpath for
  Jetty Plugin.

- Due to requirements of the Jetty Eclipse Plugin, you'll need to remove the two
  mortbay JARs from the lib/apache-jsp directory in the Jetty 11 installation,
  create a new lib/apache-jstl directory in the insllation, and populate it with
  the following two JARs:
  - jakarta.servlet.jsp.jstl-3.0.1.jar
  - jakarta.servlet.jsp.jstl-api-3.0.2.jar
  downloaded from https://mvnrepository.com/search?q=jakarta.servlet.jsp.jstl

- Use File -> Import, General -> Existing Projects into Workspace to import this
  sample.

- Use Run -> Debug Configuration (or Run Configuration) to open the launch
  configurations and start the prebuilt DevMode Plugin launch configuration.
  This will run DevMode without Jetty, as GWT Jetty doesn't support Jakarta.

- Open the prebuilt Jetty Webapp launch configuration next, and in the options
  tab, point it at your external Jetty 11 installation ("Use Jetty at path").
  Launch Jetty to finish the launch and let you run SuperDevMode in your browser.
  If you've having problems launching Jetty using the plugin, you can always
  launch it externally (outside Eclipse).  This also will allow you to use a
  more recent version of Jetty (e.g. Jetty 12) if you wish.

- (Optional) Attach the server Javadocs for the Server Framework JARs:
  - In Eclipse, right click on the project in Package Explorer.
  - On the left, select "Java Build Path".
  - Click on the Libraries tab.
  - For each of the entries SGWTEE_HOME/lib/isomorphic_contentexport.jar, SGWTEE_HOME/lib/isomorphic_core_rpc.jar,
    SGWTEE_HOME/lib/isomorphic_spring.jar, SGWTEE_HOME/lib/isomorphic_sql.jar, and SGWTEE_HOME/lib/isomorphic_tools.jar:
    - Click the plus icon (Windows) or arrow (Mac) next to the entry.
    - Select "Javadoc location:".
    - Click the "Edit..." button.
    - Click the "Javadoc URL" radio and browse to the doc/server/javadoc/ folder from the unpacked Smart GWT EE distribution.


Hosted Mode using ant (deprecated)
----------------------------------
Use 'ant hosted' to run in GWT Hosted Mode.


Configuration Files
----------------------
Application configuration files (such as server.properties and hibernate.cfg.xml)
are in src/ directory. Normally the IDE (such as Eclipse or NetBeans) copies these
files to the war/WEB-INF/classes/ directory. The provided ant build script matches
IDE behavior. If you create your own build script make sure you copy all required
configuration files from src/ to war/WEB-INF/classes/.


Database Configuration
----------------------
This sample connects to an HSQL database that contains various tables with
sample data. The database name is "isomorphic" and is located under
war/WEB-INF/db/hsqldb.

For ease of setup of this sample, a servlet listener HSQLServletContextListener
is configured in war/WEB-INF/web.xml to start and stop HSQL automatically as the
webapp is started/stopped. The contents of the database may be viewed
directly with the sample located at samples/db/run-dbm: select
'HSQL Database Engine Server' and point to

    jdbc:hsqldb:hsql://localhost/isomorphic

to browse the contents of the HSQL database.


Debugging
---------
See our debugging overview at:

    http://www.smartclient.com/smartgwt/javadoc/com/smartgwt/client/docs/Debugging.html

Note: Due to a bug in GWT, the very first time you launch hosted mode, tools such
as the Admin Console will not work. Restart to correct this problem. Compiled mode
is not affected.
