Apache Tomcat is the recommended servlet container to use with uPortal 4. While uPortal 4 requires a Servlet 3.0-compatible servlet container and another servlet container may be used, most uPortal implementers deploy to Apache Tomcat. Choosing Tomcat 8.x will likely allow uPortal adopters to get the best advice from the community.
Installing Apache Tomcat
1. Download Apache Tomcat 8.x
2. Untar the package as follows:
3.Optionally rename your install to something more meaningful:
4.Set your environment variables:
5.Test your Tomcat installation
a. First, start Tomcat
b. Go to http://localhost:8080/
You should see the Apache Tomcat Welcome screen
c. Shutdown Tomcat
1. Download Apache Tomcat 8.x for Windows
2. Unzip the download into a suitable directory. For example, you may unzip the file into the C:\ directory. This will create a directory like C:\apache-tomcat-8.x containing your Tomcat files.
3. You will need to create two environment variables CATALINA_HOME and JAVA_HOME
For Windows (different versions may vary) you can create these environment variables by doing the following: right-click 'My Computer' select properties and then the Advanced tab. Then click Environment Variables and under System variables click New. From here, you can enter the name and value for CATALINA_HOME and again for JAVA_HOME if it's not already created.
4. Start Tomcat. Try starting up Tomcat by running the C:\apache-tomcat-8.x\bin\startup.bat batch file. Point your browser to http://localhost:8080 and you should see the default Tomcat home page (see above image). To shutdown the server run C:\apache-tomcat-8.x\bin\shutdown.bat batch file.
Configuring Tomcat for uPortal
uPortal places libraries in CATALINA_BASE/shared/lib The default Tomcat 7 or 8 download does not enable libraries to be loaded from this directory.
Be absolutely certain the
Jasig portlets, as well as many other popular JSR-168 and JSR-286 portlets, rely on the ability to share user session data between the portal web application and portlet applications.
To enable this feature for Tomcat 7 or 8, add the sessionCookiePath="/" to CATALINA_BASE/conf/context.xml.
Increase Resource Cache Size
uPortal and the typical collection of portlets take a lot of space. Tomcat 8.5 issues warnings about running out of resource cache space. Add the following cache configuration just before the close of the Context node.
JVM Heap Configuration
uPortal requires a larger than standard PermGen space (Java 7 only) and more heap than may be allocated by default. A good conservative set of heap settings are
CATALINA_OPTS vs JAVA_OPTS
The uPortal instructions above previously recommended using
Required file permissions
Several uPortal webapps write to their deployed webapps folder to add dynamic content to the portal (altering the Respondr Dynamic Skin and managing Attachments uploaded to uPortal are two use cases). Insure the process Tomcat is running as has write access to CATALINA_BASE/webapps/* directories. Typically this is done by having the same account tomcat is running as be the same account you use to build and deploy uPortal.
GZipping HTML (optional but STRONGLY SUGGESTED unless doing it with Apache httpd or external appliance)
GZipping of HTML content can be performed via Tomcat. To enable this functionality, set compression="on" in the in-use Tomcat connector, and optionally set the list of compressable mime types. More information about this feature can be found in the Tomcat configuration page.
If you are fronting Tomcat wtih Apache or other hardware systems, you may want to do the compression in Apache or those systems instead.
Tomcat 7/8 parallel startup (optional)
Tomcat 7.0.23+ can be configured to have multiple webapps start up in parallel, reducing server startup time. Set the startStopThreads attribute of a Host to a value greater than one. See http://wiki.apache.org/tomcat/HowTo/FasterStartUp for more details and other suggestions.
HTTP Session Timeout
To set the duration of HTTP sessions modify CATALINA_BASE/conf/web.xml and change the session-timeout element to the number of minutes desired. Tomcat's default is 30 minutes.
Further Tomcat Configurations
Some sites have chosen to disable SSLv3 on their CAS server due to various vulnerabilities. That can cause problems with the CAS client used in uPortal being unable to establish an HTTPS connection to the CAS server to validate the service ticket and throwing an exception