- 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
- 突破平面Photoshop UI界面設(shè)計(jì)與制作剖析
- VR新未來(lái)
- Photoshop CC中文版基礎(chǔ)與實(shí)例教程(第7版)
- Moodle JavaScript Cookbook
- 輕松玩轉(zhuǎn)3D One AI
- PowerPoint 2013從新手到高手(超值版)
- RAW 數(shù)碼底片演義
- 蝶變:移動(dòng)用戶體驗(yàn)設(shè)計(jì)之道
- iOS智能手機(jī)APP界面設(shè)計(jì)實(shí)戰(zhàn)教程
- Flash CS5動(dòng)畫(huà)設(shè)計(jì)教程
- Maya Paint Effect 特效應(yīng)用手冊(cè)
- VMware Virtual SAN實(shí)戰(zhàn)
- 剪映短視頻制作從入門到精通(手機(jī)版+電腦版)
- 手把手教你學(xué)成Excel高手
- Final Cut Pro視頻后期剪輯零基礎(chǔ)入門到精通