Dashboard > Jetty > ... > Jetty Documentation > Jetspeed
Jetspeed Log In | Sign Up   View a printable version of the current page.

Added by Jan Bartel , last edited by Nigel Canonizado on May 16, 2006  (view change)
Labels: 
(None)

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

How To Integrate Jetspeed2 with Jetty6

The only thing to be aware of is that jetty6 does not support hot deployment. This means that if you copy portlet webapps into the Jetspeed2 WEB-INF/deploy directory, you must restart jetty6 in order for them to be deployed into jetty6 itself.

How to Get the Jetspeed2 Demo running with Jetty6

Step 0:

Install Jetspeed2. These instructions were tested using the Jetspeed2 installer with Jetspeed-2.0.2.

Step 1: Configure jetty6

In a new jetty configuration file, or using the etc/jetty-plus.xml config file from the distro, add the following:

  • Define the Jetspeed realm:
<Call name="addUserRealm">
  <Arg>
    <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
      <Set name="name">Jetspeed</Set>
      <Set name="LoginModuleName">Jetspeed</Set>
    </New>
  </Arg>
</Call>
  • Define the Jetspeed datasource:

These instructions are for defining a datasource which uses Derby embedded. If you installed Jetspeed2 with a different database, you will need to provide the configuration for a different DataSource. You might find it helpful to look at the jetty6 User Guide for JNDI.

<New id="derby" class="org.mortbay.jetty.plus.naming.Resource">
  <Arg>jdbc/jetspeed</Arg>
  <Arg>
    <New class="org.apache.derby.jdbc.EmbeddedDataSource">
      <Set name="DatabaseName"><SystemProperty name="jetty.home" default="." />/webapps-plus/jetspeed/WEB-INF/productiondb</Set>
      <Set name="createDatabase">create</Set>
    </New>
  </Arg>
</New>
  • Define the Jetspeed webapp and portlets

If you are using the etc/jetty-plus.xml file, you don't have to do anything as all webapps in webapps-plus will be automatically deployed on startup. If you want to create your own jetty config file, then you should do the same by copying and pasting this snippet, replacing the 2nd argument with the location of your deploy directory:

<Call class="org.mortbay.jetty.webapp.WebAppContext" name="addWebApplications">
  <Arg><Ref id="Server"/></Arg>
  <Arg>./webapps-plus</Arg>
  <Arg>org/mortbay/jetty/webapp/webdefault.xml</Arg>
  <Arg><Ref id="plusConfig"/></Arg>
  <Arg type="boolean">True</Arg>
  <Arg type="boolean">False</Arg>
</Call>
  • Copy the shared jars
    Copy all of the jars in your jetspeed installation's shared/lib directory to your jetty lib directory

Step 2: Setup Jetspeed2

  • Copy the Jetspeed webapp
    Copy the webapps/jetspeed directory from your Jetspeed installation directory into your chosen jetty deploy directory (which will be webapps-plus if you're using the defaults).

Step 3: Start jetty6

  • Now, start jetty6 using the config file you have been editing in Step 1.
  • Wait for all portlets to be deployed - this can take some time depending on the rate of the Jetspeed auto-deploy scanner

"Troubleshooting"

There is an error when running the Jetspeed demo in jetty6 beta14 - beta 16 with JDK1.5. To resolve this issue, remove the jsp-2.1.jar and jsp-api-2.1.jar from jetty lib/jsp-2.1 directory. After removing the jars, proceed to Step 4.

 

Step 4: Restart jetty6

Once all the portlets have been deployed, you need to stop and restart jetty6 so it picks up the auto-deployed portlet wars from the previous step.

That's it, the Jetspeed2 demo is now installed for jetty.

"A Note on Logging"

You may want to mess around with the logging jars a little. Jetty ships with a bridge from commons-logging to the slf4j logging framework (see lib/jsp). Any component in Jetspeed that uses commons-logging will probably wind up putting its output into the slf4j controlled log.

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators