官术网_书友最值得收藏!

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:

Changing the context root

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:

Changing the portal port

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.

Setting email service

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
主站蜘蛛池模板: 南宫市| 广德县| 海林市| 日照市| 三门峡市| 临沂市| 靖州| 宣威市| 湘潭市| 吕梁市| 伽师县| 乐平市| 大宁县| 南华县| 虎林市| 南木林县| 新兴县| 苍山县| 广南县| 讷河市| 吉首市| 周至县| 井陉县| 杨浦区| 宜黄县| 沂南县| 郎溪县| 凌源市| 吉安县| 全椒县| 漳平市| 瑞昌市| 肇东市| 林西县| 喀什市| 崇文区| 呼图壁县| 独山县| 桑植县| 灵璧县| 松江区|