After iportal.war of SuperMap iPortal has been deployed successfully, The access URI is: http://{ip}:{port}/iportal. If we the iportal.war is renamed, for example rename it as "renameiportal.war", then the access address is http://{ip}:{port}/renameiportal.
Deploying on Apache Tomcat
Before deploying SuperMap iPortal on Apache Tomcat, please check the whether the software environment meets the requirement (refer to Environment Configuration for war Package).
Start Apache Tomcat (Tomcat for short), and put the war package into the following directory: [The Tomcat root directory]\webapps, and then Tomcat can publish the war package as the Web service. For example, start Tomcat, and put iportal.war into the webapps directory, and then the activation of the SuperMap iPortal core functions is completed. Visit http://<server>:<port>/iportal/services, and then get all the features of SuperMap iPortal.Uses iportal # help.war to publish the help document as the online form, the visited URI is: http://{ip}:{port}/iportal/help.
Deploying on TongWeb
Before deploying SuperMap iPortal on TongWeb, please check whether the software environment meets the requirement (refer to Environment Configuration for war Package).
Note:
-
In order to ensure that the SuperMap iPortal file selector can be used normally, it is necessary to configure the URL parameters in TongWeb to allow the existence of unencoded special characters, and this configuration change can take effect without restarting the Tongweb service: visit the TongWeb management console, and add a new property called RelaxedPathChars and RelaxedQueryChars with the values configured as []|{} in the WEB Container Configuration>HTTP Channel Management>tongweb-http -listener>Other properties.
-
Please use JDK 11 for SuperMap iPortal version 11.2.1 or above, but under the running environment of TongWeb with SuperMap iPortal version 11.2.1 or above and JDK 11, there may be an error in decompressing the file, the corresponding solution: Need to add -Djdk.util.zip.disableZip64ExtraFieldValidation=true in the tongweb root directory /bin/external.vmoptions.
-
In order to avoid abnormal loading of static resources inside the project package, you need to configure the WEB container -> HTTP channel management in the TongWeb management terminal, click tong-http-listener, and add two new properties to the other Property attributes: cacheMaxSize=20000, cachingAllowed=true.
-
TongWeb disables DELETE and PUT requests by default, which will lead to abnormalities in the functions that use related requests, such as deleting services; so you need to configure the WEB container -> HTTP channel management in the management terminal of TongWeb, click tong-http-listener, and modify the other settings -> disable HTTP request methods, refer to the following configuration:
On Windows, steps for deploying SuperMap iPortal to TongWeb are as follows:
TongWeb 6.X
1. In the [TongWeb root directory] \bin\startserver.bat file, set the following:
set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true.
Note:
1.TongWeb installs and deploys iPortal via deb packages in a classified environment, the startserver.sh configuration file cannot be modified (the startserver.sh script is not allowed if it is modified). Add the following parameters to the external.vmoptions configuration file in the [TongWeb installation path]/bin folder:
-Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
2. Modify the configuration file (tongweb.properties) in the [TongWeb installation path]/conf folder. Add the following contents to the configuration file:
tongweb.util.scan.StandardJarScanFilter.jarsToSkip=jersey-*.jar,hadoop-*.jar,tyrus-server*.jar
3. Start TongWeb and set the JVM parameters.
Execute startup in the [TongWeb installation path]/bin directory:
nohup ./ startserver.sh &
Enter the address of the TongWeb management console in your browser: http://{ip}:{port}/console and set the JVM parameters.
Configure the jvm parameters in “Startup Parameter Settings” - “Other jvm Parameters”. Click “Add”, enter the following parameters and save:
-Dorg.sqlite.lib.path=/opt/SuperMap/iportal_support/sqlite-jdbc
-Dorg.sqlite.lib.name=libsqlitejdbc.so
-Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true
-Djava.library.path=${TongWeb_Home}/lib:${TongWeb_Home}/bin:${JAVA_HOME}/bin:/opt/SuperMap/iportal_support/objectsjava/bin
-Djava.ext.dirs={JAVA_HOME}/jre/lib/ext:/opt/SuperMap/iportal_support/objectsjava/bin
Among them:
-Djava.library.path Configure environment variables, paths to components;
-Djava.ext.dirs Configure jar extensions and component variables. Failure may cause user-developed war package programs to fail to read supermap-related libraries.
4. After modifying the configuration, restart TongWeb and deploy iportal.war. there are two ways to deploy:
- Automatically deploying iportal.war
Put the decompression war package into the following directory: [TongWeb root directory]\autodeploy. Start TongWeb, you can see war package has been published as a Web service.
- Deploying iportal.war via the Management Console
- In the browser, enter the TongWeb Administration Console address: http://{ip}:{port}/console
- Enter the user name and password for logging in to TongWeb. For TongWeb6.0, the default user name is twnt, and password is twnt123.com
- Click "Application Management", then "Deploy Application"
- "File location" need to select "server", select where the server.war located in, click "start deployment"
- Fill in the additional information for application deployment in order, and you can also use default values. Click "Finish"
- After the deployment is complete, you can view information throught "Application Management" page. And an "activated" state indicates that the deployment was successful. Click "Access", now you can access iPortal.
5. After starting TongWeb, you can visit TongWeb's management interface to view the deployment of war package.
6. Starting the iPortal service for the first time will fail, and after that failure executing . /stopserver.sh to stop the service. An iPortal directory appears in the TongWeb deployment directory:
- Modify <startElasticSearch> in /deployment/iportal/WEB-INF/iportal.xml to false.
- If you need to allow cross-domain requests from other servers to succeed after iPortal has started, configure cross-domain access by modifying the web.xml configuration file (located in the [TongWeb root directory]\autodeploy\iportal\WEB-INF directory) by modifying /deployment/iportal/WEB-INF/web.xml as follows.
<filter> <filter-name>CorsFilter</filter-name> <filter-class>com.tongweb.catalina.filters.CorsFilter</filter-class> <async-supported>true</async-supported> <init-param> <param-name>cors.allowed.origins</param-name> <param-value>*</param-value> </init-param> <init-param> <param-name>cors.allowed.methods</param-name> <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> </init-param> <init-param> <param-name>cors.allowed.headers</param-name> <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value> </init-param> <init-param> <param-name>cors.exposed.headers</param-name> <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> </init-param> <init-param> <param-name>cors.support.credentials</param-name> <param-value>false</param-value> </init-param> </filter> <filter> <filter-name>httpHeaderSecurity</filter-name> <filter-class>com.tongweb.catalina.filters.HttpHeaderSecurityFilter</filter-class> <init-param> <param-name>antiClickJackingEnabled</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>antiClickJackingOption</param-name> <param-value>SAMEORIGIN</param-value> </init-param> <init-param> <param-name>blockContentTypeSniffingEnabled</param-name> <param-value>false</param-value> </init-param> <async-supported>true</async-supported> </filter> ... <filter-mapping> <filter-name>CorsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>httpHeaderSecurity</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Note that when defining Filters and FilterMappping in web.xml, there is a strict order in which the Filters are loaded and executed, which is consistent with the order in which the web filters are defined. If you need to control the cross-domain access request more precisely, please refer to Configuring the startup of cross-domain access whitelist. After making the changes, restart the tongweb service to enable cross-domain access to the local iPortal from other servers.
7. For iportal#help.war, you need to rename it so that the name does not contain special symbols "#", Change iportal#help.war to help.war, and then deploy. Place the unzipped help.war in the iPortal directory in step 6 above.
8. Start the built-in ElasticSearch service (located in %SuperMap iPortal_HOME%/bin/startes.sh) or other ElasticSearch services of the product package, and according to the ElasticSearch service started, modify the /deployment/iportal/WEB-INF/config/search/WEB-INF/search-beans.xml file.
9. Execute . /startserver.sh to start the service, access tongweb admin, find iPortal in the application management, click http access to access iPortal, if it works properly with iPortal, the deployment is complete.
TongWeb 7.0
TongWeb 7.0 deployment process is basically the same as TongWeb 6.X. Refer to the configuration steps of 6.X for deployment.