Both Tomcat and Oracle XML DB use port 8080 by default. Before installing JBoss I first changed the default port for XML DB as suggested here.
I restarted the Oracle database and verified port 8081 was in use and not 8080.
Getting started with CruiseControl is relatively straightforward, see http://confluence.public.thoughtworks.org/display/CC/Getting+Started+With+CruiseControl
To place an application on CruiseControl it should have an Ant script to build it. The application Ant script does not need to interact with Subversion. The source for the application including the Ant script should be checked into Subversion.
I started to install CruiseControl by downloading and compiling the source, but my version of ant was too old. Instead I downloaded the binary (which ironically includes a newer ant also):
unzip -d /opt cruisecontrol-bin-2.7.2.zip
useradd --system --home /srv/cruisecontrol --create-home --gecos "System account to run CruiseControl" cruise
usermod -s /bin/ksh cruise
su – cruise
mkdir checkout logs artifacts
Now we need to configure CruiseControl to monitor the Subversion repository. Create config.xml:
Build-myproj.xml contains Ant steps to checkout a clean copy of the application and build it:
To setup the dashboard, running at :8080
su - cruise
cp /opt/cruisecontrol-bin-2.7.2/dashboard-config.xml .
kill `cat cc.pid`
There are many ways to do it, but this incantation worked for me on an Ubuntu host. This is an ‘entry level’ setup with one repository and simple authentication. Read the Subversion book and Ubuntu documentation to understand.
apt-get install subversion
adduser --system --home /srv/svn --gecos "System account to run svnserve" svn
svnadmin create /srv/svn
chown -R svn:nogroup /srv/svn
apt-get install xinetd
cat >> /etc/xinetd.d/svn << "EOF"
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /srv/svn
# uncomment line to use default password file (~svn/conf/passwd)
cat >> ~svn/conf/passwd << "EOF"
fred = *****
chmod 600 ~svn/conf/passwd
Struts (or more correctly, the Struts Action Framework) is probably the most successful Java web-application framework to date. It enables organization of Java web-applications using a model-view-controller (MVC) approach that makes it easier to write and maintain non-trivial applications.
The framework comprises
A front controller servlet (ActionServlet) that accepts, processes, and routes all incoming HTTP requests in accordance with a configuration file (struts-config.xml)
RequestProcessor and Action classes that can be extended and customized with application logic.
A set of JSP tag libraries (html, bean, logic, tiles) to simplify building forms and displaying output.
Support for populating HTML form input into regular or dynamic beans (DynaBeans).
Support for validating input and displaying error messages (ActionErrors, ApplicationResources.properties)
The version of Struts shipped with JDeveloper 10.1.2 was 1.1. A number of books have been written about this version, see the Apache Struts 1.1 Project Home Page. Using 1.2 should not be a significant problem, but it does not include compelling enhancements. Note Struts 1.1 includes Commons BeanUtils 1.6.
Organize applications into pages, eg. CustomerSearch.jsp, CustomerView.jsp, CustomerEdit.jsp.
Follow the Oracle Browser Look And Feel (BLAF) guidelines for all corporate applications, see the Oracle Browser Look and Feel (BLAF) Guidelines. Use the blaf.css provided with JDeveloper, do not modify it. Use the icons from the BLAF icon repository.
Place all JSPs into the WEB-INF directory, where they cannot be invoked directly. Provide a start.jsp in the public web root directory that forwards to a Struts action to start the application. Set start.jsp as the welcome file in web.xml.
Refrain from adding scriplets to JSPs as far as possible: place code in the corresponding Java class and use Struts :bean tags to display results in the JSP.
For each JSP create a corresponding Java class that extends DispatchAction and which handles requests from the JSP.
Use DynaActionForms to capture form input. These are configured in struts-config.xml, eliminating the need to write Java bean classes for each input form.
Do not place database access code into JSPs or Action classes: factor out this code into separate data access objects (DAOs). Configure data sources using the servlet container, not the (deprecated) struts-config.xml option. Name data sources after the username or schema used for the connection, not the target database instance.
Write error diagnostic and tracing information to the servlet context log, do not simply print a stack trace. This may be done by extending struts.action.RequestProcessor.
Declare error pages in web.xml to handle unexpected server errors (500) and missing resources (404). It may be convenient to comment these out in development environments.
Review Ambysoft’s Coding Standards for Java
At a minimum use an initial capital for classes and an initial lower case for variables. Use all caps only for constants, ie. where ‘static final’ is used.
Do not declare global variables: at a minimum use singleton beans. Global constants are OK.