In the next section you will be required to
to select directories for each of the path items shown. If during this exercise, you see the directory "c:\FakePath"
or anything other than the path you are trying to select, you may have to modify your browsers settings.
|
We now have a new empty forms database named "cmwork".
to add tables, we will use the script that is included in your war file (which is now exploded into your
Eclipse Tomcat Server environment).
Click the "Run Script link"
C:\yourworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\webapps\GalenaAdmin\html\app\NewEmptyDatabase.sql
The database is built, but it is not available to either your application, nor GalenaAdmin. To make
the a database available, it must be configured into the servers context.xml file and the web.xml file.
These files are located in the "Server" project in your workspace.
You can manually add the Database resources to these files, or you can let GAdmin do it for you. Let's first look at the
manual process for adding resources to Context.xml.
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
maxActive="100" maxIdle="10" maxWait="10000" name="jdbc/cmworkq"
password="admin" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/cmworkq"
username="root" />
...and for Web.xml
<resource-ref>
<res-ref-name>jdbc/cmworkq</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Ok, enough of that manual non-sense - To let GAdmin add the proper entries, you must first make sure
to select the resource you want to configure.
1) click the link to search for the "Server" folder, then select the Tomcat folder which contains your
context.xml file.
2) Select the context.xml file, and click ok.
3) Now verify that the path shown is correct.
4) Click the Update button to save any changes
5) Click the "Upd Web/Conext" button.
Since the web, and context.xml files have
been modified from outside Eclipse, it is unaware of the change. You need to now refresh the server and
I always recommend doing a clean on the server before restarting.
Once Tomcat is
running you are ready to run GAdmin and begin configuring and building the new application.
http://localhost:8080/GalenaAdmin