The example can be found in the
<JChem home>/examples/db_search
directory.
Steps of installation:
If you don not have an existing JSP capable web server, we recommend installing
Apache Tomcat.
<JChem home>\lib\
and the jar or zip file containing the JDBC driver
in the classpath of the servlet server.Don't forget to update these files whenever you install a new version of JChem.
Create a web application for JChem.
Tomcat instructions
Initialize a database for structure handling using JChemManager.
Create a table
called editexample
using
JChemManager.
Import an SD file containing chemical structures into the new table.
When the example system is set up,
try it by loading
<JChem's URL>/examples/db_search/setup.jsp
into your browser.
Tomcat:
If the web server is located on your machine on the default port (8080), load
http://localhost:8080/jchem/examples/db_search/setup.jsp
You can alter the following settings here:
Insert
, modify
, update
and import
commands are not allowed on these tables for the
users of the JSP example.
For example: REACTIONS;STRUCTURES
If your RDBMS supports schemes, specify the schema too:
SCOTT.REACTIONS;SCOTT.STRUCTURES
The case of the letters is important. When an RDBMS (like Oracle)
stores the names in upper case, enter the
name of the table using capital letters.
<jchem_home>/examples/db_search/ChemicalTermsFilters.xml
.
NOTE: You have to specify a file path on the server so the web server can
locate the file.
open_sessions * rows_in_largest_table * searches_to_remember * 4
.
* For the driver, url, username, password, and property table the following rules apply:
Additional properties:
There is a text area for defining some other properties for the example application. You will find some example variables here after installation.
The <table_name>.queryConditions
variables define
conditions that can be set for a query.
The fields have to be separated by semicolon.
A default value for all structure tables can be defined by using the
"default." tag before the queryConditions
instead of the
table name.
For example:
SCOTT.JSPEXAMPLE.queryConditions=cd_id;cd_molweight#Molweight default.queryConditions=cd_id#Id:
The text after the #
character (if specified) will be written
on the query page instead the database name of the field.
Forms for displaying a result can be defined here as well.
After setting all values you can store the settings and start using the example by
pressing the Save changes
button.
The first page of the example is a login page. After the login, entered values will be stored in cookies and will appear on the next login.
The page can be bypassed by defining the properties mentioned above in the setup.jsp
.
If you receive the message "Error: Maximum number of searches allowed per minute is exceeded. Please try it later", then please for a license key that allows more frequent searching.
Please note that some less sophisticated databases like MS Access don't support parallel update or insert operations.
Instructions for license installation can be found here:
Installing licenses.
The user account of the ChemAxon license should be set on the Properties>Log On tab of Apache Tomcat service.
If you have any problem concerning the installation of the example, visit our forum or .