- JBoss Portal Server Development
- Ramanujam Rao
- 461字
- 2021-05-21 20:13:07
Configuration
Once the server is installed, we can plan on customizing it to our environment and setting up the values that will facilitate effective functioning of the server.
There are several configuration parameters that can be configured or changed in the server, such as context root, email, ports, and so on. In this section, we will talk about a few important ones.
Changing the context root
The default context path for the portal is /portal
, and the portal server responds onhttp://localhost:8080/portal
. However, the context path can be changed to a path of your choice by editing the web server configuration file in both the bundled version as well as the binary sar
versions. For source builds, the change needs to go into a property file before the server is built.
To change the context path in the configuration file, we will need to edit the file $JBOSS_HOME/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/jboss-web.xml
We then need to change the value of the element, <context-root>
from portal
to the desired value. As seen in the following screenshot, the value is changed from portal
to archway:

Once this file has been changed and saved and the server has been restarted, the portal server now responds on http:// localhost:8080/archway
.
Changing the portal port
To change the default port setting, we need to edit the $JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml
file. Under the jboss.web
service node, we need to change the value of the element <Connector port=>
to port 80
.
The updated configuration is as follows:

It is important that when the port is changed, any dependencies such as remoting portlets or WSRP settings are also updated. We will talk about remote portlets in later sections of this chapter.
Setting email service
Emails are used for workflow processes, or to verify registered users. JBoss portal, by default, assumes an SMTP server on the local machine on which it runs. Sometimes, it is a good idea to set up email configuration during installation. To change the default setting, the $JBOSS_HOME/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml
file needs to be edited.
The MBean configuration for mail can be changed to point to a different mail gateway with appropriate authentication credentials.
The following figure shows an updated configuration using a remote SMTP server with a user ID and password.

Configuring proxies
Some of the portlets in the server, such as weather, stock tickers, and so on, require Internet access to request and present updated information. Similarly, to request and process RSS feeds, the server needs to access the Internet. Some enterprises do not have direct access to the Internet and require access through proxy servers.
The portal server can be configured to use proxies by adding the JAVA_OPTS
environment variable to the portal server startup script when Java is invoked to start the JVM.
A typical setting option is as follows:
-Dhttp.proxyHost=proxy.xyz.net -Dhttp.proxyPort=8118
- Python 2.6 Graphics Cookbook
- Moodle 2 for Teaching 4/9 Year Olds Beginner's Guide
- Hadoop核心技術
- 穿越Photoshop CC
- CorelDRAW服裝設計實用教程(第四版)
- MLOps實戰:機器學習模型的開發、部署與應用
- 老郵差·Photoshop數碼照片處理技法:人像篇(修訂版)
- 短視頻剪輯基礎與實戰應用(剪映電腦版)
- 原片蛻變:Photoshop CC商業修圖必修課
- 好用,Excel數據處理高手
- 玩轉電子設計:基于Altium Designer的PCB設計實例(移動視頻版)
- SolidWorks 2017基礎與實例教程
- Oracle BI Publisher 11g: A Practical Guide to Enterprise Reporting
- Jasmine JavaScript Testing
- Apache Solr High Performance