Skip to main content

uPortal Development, Part 2

Posted by gsporar on February 27, 2006 at 9:00 PM PST

In
Part 1
I showed how to get started with uPortal development by creating
a project in the NetBeans IDE that uses the uPortal Quickstart. The uPortal page
that displayed shows some problems, however. For example, logging into uPortal
with a name and password of "demo" and then clicking the C Web Proxy Examples
tab displays this error message:

8080error.png

It turns out the uPortal Quickstart code assumes that Tomcat is running on port 8080. Doing a search across
the project for "8080" finds ten files that have at least one occurrence of 8080 hardcoded. The
Tomcat installation included with the NetBeans IDE is configured to run on port 8084. It's
easy to change, however. Select Tools > Server Manager. Select
the entry for Tomcat and then change the server port to 8080 and the shutdown port
to 8024.

set8080.png

Click the Close button after changing the value. The new value will not take affect until
the next time Tomcat starts, so stop Tomcat by right-clicking its entry in the Runtime window and
select Stop. An additional limitation of the uPortal Quickstart is that it references
applications for which it does not provide the source. In the example shown above, it is referencing
one of the sample Tomcat applications. Those samples are not installed by default with the Tomcat
that is included with the NetBeans IDE (although they are available as sample projects). In addition,
the uPortal Quickstart references other applications that are not in its source - an example of this
is the Google Portlet, which is on uPortal's Portlet Examples page. The uPortal Quickstart does
include the binary versions of these applications, however, so there is a workaround.

Under the folder where the uPortal Quickstart was unzipped, there is a Tomcat_5-5-9/webapps folder. Copy
the following folders from it:

  • /balancer
  • /GooglePortlet
  • /jsp-examples
  • /RenderCountPortlet
  • /RssPortlet
  • /servlets-examples
  • /testsuite

The destination folder is the /webapps folder that is under the base directory for the Tomcat installation that
is included with the NetBeans IDE. Note that this folder by default is under the IDE's user directory. To
find out the Tomcat base directory, select Tools > Server Manager and then click the
Bundled Tomcat entry:

tomcatSettings.png

So for the configuration shown above, the destination folder is F:/tools/windows/dev/netbeans/5.0/ga/userdir/jakarta-tomcat-5.5.9_base/webapps.
Start Tomcat again and logon to uPortal using "demo" as the user name and password. Clicking the
C Web Proxy Examples tab should now display this:

cWebProxy.png