KnowGate Open Source CRM
es en

Configuring /WEB-INF/web.xml

web.xml

After executing the Setup Wizard, it is recommended to check the contents of /WEB-INF/web.xml file for configuring additional parameters of servlets from package com.knowgate.http.
There must be created the servlets: HttpBinaryServlet, HttpBlobServlet and HttpQueryServlet.

Servlets

hipergate includes servlets for file download, remote database access, URL shortening, Google Calendar, ICalendar and VCard interoperability. Required Servlets

• HttpSchedulerServlet: Job Scheduler. Used by the e-mail marketing module.
• HttpBinaryServlet: Download files under /storage directory. Used by virtal disk module.
• HttpBlobServlet: Download files form LONGVARBINARY database fields. Used by the project management module.

Optional Servlets
• HttpCalendarServlet: Interoperability with Google Calendar.
• HttpDataObjsServlet: Remote database access through HTTP. It is not recommended to setup this servlet without a previous security audit and use it only through HTTPS and it allows full SQL access to the database with out any restriction.
• HttpShortURLRedirect: URL shortener and redirector.
• HttpVCardServlet: Read VCard contacts from external sources.

For each of the required servlets (HttpBinaryServlet, HttpBLOBServlet y HttpQueryServlet) the following parameters must be configured:

jdbcDriverClassName
JDBC driver, as the driver property of hipergate.cnf
jdbcURL
Database connection string, as dburl property of hipergate.cnf
dbUserName/dbUserPassword
User and password for database access, as dbuser/dbpassword properties of hipergate.cnf

The parameters for connecting to the database for servlets from package com.knowgate.http (HttpBinaryServlet, HttpBLOBServlet y HttpQueryServlet) may be established at /WEB-INF/web.xml or at /etc/hipergate.cnf. The information of web.xml is used over those at hipergate.cnf if both differ, then web.xml will be used.

The parmeters of web.xml may be left empty if only one webapp of hipergate is running on the same server, but they must have values if several hipergate webapps are running on the same server against different databases.

            <servlet>
                  <servlet-name>HttpBinaryServlet</servlet-name>
                  <servlet-class>com.knowgate.http.HttpBinaryServlet</servlet-class>
          
                  <init-param>
                      <param-name>jdbcDriverClassName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>jdbcURL</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserPassword</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>id_product</param-name>
                      <param-value></param-value>
                  </init-param>
          
                  <init-param>
                      <param-name>id_location</param-name>
                      <param-value></param-value>
                  </init-param>
          
                  <init-param>
                      <param-name>id_category</param-name>
                      <param-value></param-value>
                  </init-param>
          
                  <init-param>
                      <param-name>id_user</param-name>
                      <param-value></param-value>
                  </init-param>
              </servlet>
          
             <servlet>
                  <servlet-name>HttpBLOBServlet</servlet-name>
                  <servlet-class>com.knowgate.http.HttpBLOBServlet</servlet-class>
          
                  <init-param>
                      <param-name>jdbcDriverClassName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>jdbcURL</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserPassword</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>nm_table</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>nm_field</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>pk_field</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>pk_value</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>bin_field</param-name>
                      <param-value></param-value>
                  </init-param>
              </servlet>
          
             <servlet>
                  <servlet-name>HttpQueryServlet</servlet-name>
                  <servlet-class>com.knowgate.http.HttpQueryServlet</servlet-class>
          
                  <init-param>
                      <param-name>jdbcDriverClassName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>jdbcURL</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserName</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>dbUserPassword</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>queryspec</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>columnlist</param-name>
                      <param-value>*</param-value>
                  </init-param>
                  <init-param>
                      <param-name>where</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>orderby</param-name>
                      <param-value></param-value>
                  </init-param>
                  <init-param>
                      <param-name>showas</param-name>
                      <param-value>XLS</param-value>
                  </init-param>
              </servlet>
              
              <servlet-mapping>
                  <servlet-name>HttpBinaryServlet</servlet-name>
                  <url-pattern>/servlet/HttpBinaryServlet</url-pattern>
              </servlet-mapping>
          
              <servlet-mapping>
                  <servlet-name>HttpBLOBServlet
                  </servlet-name>
                  <url-pattern>/servlet/HttpBLOBServlet</url-pattern>
              </servlet-mapping>
          
              <servlet-mapping>
                  <servlet-name>HttpQueryServlet</servlet-name>
                  <url-pattern>/servlet/HttpQueryServlet</url-pattern>
              </servlet-mapping>
          

Configuration of several hipergate webapps running on the same Tomcat server

It is possible to run several webapps of hipergate against different databases on the same Tomcat server.
Each webapp required its own properties file like hipergate.cnf but with a different name.
All the properties files for all the webapps must be placed at the same directory, by default /etc or C:\Windows or at the one specified by the environment variable KNOWGATE_PROFILES.
The public build of hipergate may work with the following property files other than hipergate.cnf:
demo.cnf, devel.cnf, portal.cnf, real.cnf y test.cnf.
For using a properties file other than hipergate.cnf edit /web/methods/dbbind.jsp and replace the class com.knowgate.dataobjs.DBBind en dbbind.jsp with a subclass of it:

app.cnfcom.knowgate.dataobjs.DBApp
crm.cnfcom.knowgate.dataobjs.DBCRM
demo.cnfcom.knowgate.dataobjs.DBDemo
devel.cnfcom.knowgate.dataobjs.DBDevel
portal.cnfcom.knowgate.dataobjs.DBPortal
real.cnfcom.knowgate.dataobjs.DBReal
test.cnfcom.knowgate.dataobjs.DBTest
web.cnfcom.knowgate.dataobjs.DBWeb
work.cnfcom.knowgate.dataobjs.DBWork
intranet.cnfcom.knowgate.dataobjs.DBIntranet

So for using test.cnf properties file, dbbind.jsp must be:
<jsp:useBean id="GlobalDBBind" scope="application" class="com.knowgate.dataobjs.DBTest"/>

hipergate © 2003-2013 KnowGate. Some rights reserved [] [] [Valid XHTML 1.0] [Valid CSS 3]