Note: this is detailed information most users (hopefully) won't need. Basic setup is covered in the Step-By-Setup setup.
- SurveyTool looks for "jdbc/SurveyTool" as a JNDI name. In the future, this will be the only configuration needed.
- At start-up, the Survey Tool will create any tables needed.
- You will be editing context.xml to add a <Resource...> element as described in the following sections. context.xml is either in your server's runtime directory, or in the following location if you are using Eclipse:
Database Specific Instructions
Automated Derby (easier to setup, but doesn' t support all SurveyTool features)
- Simply startup the Survey Tool without configuring the database. Right-click on "cldr-apps" and choose "Run on Server". Wait for the web page to load.
- An empty database will be created for you, and configuration information will be shown on the initial webpage. It will be an XML element starting with "<Resource …"
- Copy the entire
<Resource>…</Resource> element into the <Context> element located in context.xml ( see previous section, JNDI. )
- Right-click the server and choose Restart.
- SurveyTool should start up normally.
MySQL (production use, full featured)
- Set up MySQL 5
- On Linux, use your distribution's package mannager. On Mac, use homebrew
- Note: you must run 'mysql_secure_installation' or equivalent to set a root password, otherwise other access control settings will be silently ignored.
- (Recommended: I like to use the "MySQL workbench" GUI to administer mysql)
- Create a database (schema), for example '
cldrdb', with the user, for example, '
usernam3' with the password '
- Ironically, the database should be created with latin1 (latin1_bin) codepage and encoding. This is because full Unicode support was lacking when the SurveyTool was developed, and so binary blobs are used for Unicode data.
- Download and install the MySQL 5 Connector for J into your tomcat's
lib/ directory (you don't need to build against it)
- Note that the SurveyTool Setup tool has a "MySQL Configurator.." button at the last page. You can use this to generate the <Resource> element below.
Set up the JNDI resource.You will need to add the following <Resource ... item to the server's context.xml.
If you are using Eclipse, you can find the context.xml in the "Servers" project, under "Tomcat v6.0 Server on Localhost" as "context.xml".
Put the following near the end of the file, before the final "</Context>". Change the boldfaced parts as appropriate.