smarteditor-webapp-.war
The binary file is a zip archive having the file extension .war
. For the configuration of this file we suggest to unpack it, apply the proposed changes in this document and put it onto your servlet container afterwards.
$ svn co https://svn.52north.org/svn/metadata/smarteditor/trunk/editorHaving the Maven tool in your system path, you can build the web application via the maven goal:
$ mvn install
After that, you should find the smarteditor-webapp-.war
file in the editor/smartEditor/target
directory.
WEB-INF/
$EDITOR_HOME
in the next chapters.
WEB-INF/config/sql
.$TOMCAT_HOME
in the next chapters.
$TOMCAT_HOME/conf/server.xml
and add the following snippet to the <GlobalNamingResources>-Element:
<Resource name="jdbc/editor" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="0" maxWait="10000" defaultAutoCommit="false" username="[db user]" password="[db password]" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@[database host]:1521:[SID]"/>Note: This snippet has the Oracle JDBC driver class and JDBC URL connection template pre-configured. You have to change these values if you use a different database! The following example shows a Postgres database configuration for a local database called "smarteditor" with username and password of the same value.
<Resource name="jdbc/editor" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="0" maxWait="10000" defaultAutoCommit="false" username="smarteditor" password="smarteditor" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/smarteditor"/>
$TOMCAT_HOME/lib
. The driver appropriate to the database product used is usually supplied with the product and can also be downloaded from the manufacturer's website.
$TOMCAT_HOME/webapps
folder, it is necessary to create a smartEditor.xml
context file to be put into the $TOMCAT_HOME/conf/Catalina/localhost
folder. The file definition looks like this:
<?xml version="1.0" encoding="UTF-8"?> <Context reloadable="true" crossContext="false" antiJARLocking="false" docBase="[path to smartEditor]" debug="0" antiResourceLocking="false"> <!--jndi support--> <ResourceLink name="jdbc/editor" global="editor" type="javax.sql.DataSource"/> <!--disable persistent sessions--> <Manager distributable="false" saveOnRestart="false" pathname=""/> </Context>Please note the
docBase
attribute that needs to point to the smartEditor folder. The ResourceLink provides a web application internal JNDI resource named jdbc/editor
but delegates it to the global resource editor configured above.
$EDITOR_HOME/WEB-INF/classes/application.properties
is the main configuration file for the whole smartEditor application. The following table shows all configuration attributes and adds some explanatory information:
attribute name | default value | explanation |
---|---|---|
locale.default | en | default application locale |
csw.discovery | <none> | URL to the CSW disocvery service bound to this smartEditor instance (necessary when starting up with an ISO fileIdentifier) |
csw.manager | <none> | URL to the CSW-T endpoint. smartEditor will send documents to this URL when publishing metadata |
import.xslt.dir | /internal/import | internal configuration (do NOT change) |
external.xslt.dir | /internal/external | internal configuration (do NOT change) |
dictionary.resource.xml | /codelist_enumeration.xml | internal configuration (do NOT change) |
dictionary.resource.messages | /isolist | internal configuration (do NOT change) |
map.service.url | http://vmap0.tiles.osgeo.org/wms/vmap0? | default OGC WMS map service to be displayed in the smartEditor |
layer.names | basic | layer names to be displayed |
bbox.minx | -30.0 | default BBOX parameter |
bbox.miny | 35.0 | default BBOX parameter |
bbox.maxx | 50.0 | default BBOX parameter |
bbox.maxy | 70.0 | default BBOX parameter |
projection | EPSG:4326 | default CRS for map |
image.format | image/png | default image output format for map widget |
db.jndi.name | java:comp/env/jdbc/editor | default lookup name for container managed database resource |
db.hibernate.dialect | org.hibernate.dialect.Oracle9iDialect |
specific SQL dialect implementation for hibernate, choose the one that fits to your database vendor |
db.hibernate.schemaUpdate | false | do not allow hibernate to create tables if they do not exist |
db.hibernate.showSQL | false | debug SQL statements of hibernate |
when running smartEditor in conjunction with 52n security com ponents or sdi.suite securityManager these parameter needs to be defined for a proper validation of the SAML tokens | ||
security.keystore.provider.class | defaults to de.conterra.smarteditor.common.authentication.ClassPathKeyStoreProvider | the class that loads the keystore file: use de.conterra.smartedito r.common.authentication.ClassPathKeyStoreProvider if the keystore is located in the classpath use de.conterra.smartedito r.common.authenticati on.SystemIdK eyStoreProvider if the keystore is l ocated somewhere on the hosting machine |
security.keystore.pwd | defaults to ‘changeit | password to access the keystore |
security.keystore.path | /.keystore | path to the keystore containing the certificate that is used to sign the SAML assertions within the SAML token. Path needs to be classpath resolvable |
security.certificate.alias | for example “gpt - security” if integrating with ESRI Geoportal Server | alias of named certificate |
security.certificate.pwd | defaults to ‘changeit | password to access the certificate |
$EDITOR_HOME/WEB-INF/classes/log4j.xml
. The file contains the following information:
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <param name="Threshold" value="WARN"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%-5p] %d [%t] %c-%m%n"/> </layout> </appender> <appender name="LOGFILE" class="org.apache.log4j. RollingFileAppender"> <param name="File" value="${catalina.base}/logs/smarteditor-webapp.log"/> <param name="Threshold" value="INFO"/> <param name="MaxFileSize" value="5000KB"/> <param name="MaxBackupIndex" value="3"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%-5p] %d{ISO8601} [%t]%c-%m%n"/> </layout> </appender> <logger name="de.conterra.smarteditor"> <level value="INFO"/> </logger> <logger name="org.springframework"> <level value="WARN"/> </logger> <root> <level value="WARN"/> <appender-ref ref="CONSOLE"/> <appender-ref ref="LOGFILE"/> </root> </log4j:configuration>If necessary the output location of the logfile can be changed. The level of detail of the logging can be determined by setting the level value from
INFO
to DEBUG
.
I | Attachment | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|
52n_smarteditor_2.1.6_installation_guide.pdf | manage | 490 K | 24 Feb 2015 - 18:30 | DanielNuest | ||
zip | smartEditoer-2.1.6-sql.zip | manage | 2 K | 28 Oct 2015 - 09:30 | DanielNuest |