Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Follow the instructions at <link to be added here> to add Geronimo 2.0 server runtime into WTP, and to create & deploy an "HelloWorld" Dynamic Web project.

Enable Maven 2 support for the web-app project and add a dependency:

  • In Project Explorer view, right click on "Hello World" web-app project, select "Maven -> Enable Dependency Management". Leave default options as-is and click "Finish".
  • Right click again on "Hello World" web-app project and select "Maven -> Add Dependency". Enter "commons-dbcp" as query, and in "Search Results" select say "1.3-SNAPSHOT-commons-dbcp-1.3-.." and click "OK".

Double click on "HelloWorld -> WebContent -> index.jsp" to open it in editor and add "<br><%= org.apache.commons.dbcp.DriverConnectionFactory.class.getName() %>" before the "</body>" tag. Click "Ctrl + S" to save changes. Make sure "org.apache.commons.dbcp.DriverConnectionFactory" class is resolved with no "type not resolved" errors.

a) In "Servers" view, double click on the server instance (like "Apache Geronimo v2.0 Server ..") to open the server editor.
b) In server editor, under "Test Environment", select "Enable in-place shared library support." as shown below:
Image Added

c) Save and close the server editor.

Step-2:
a) Double click on "Hello World -> Web Content -> WEB-INF -> geronimo-web.xml" to open it in Geronimo Deployment Plan Editor.
b) In "General" tab, select "Add a run time dependency to Geronimo's shared library" as below:
Image Added

c) Press "Ctrl+S" to save the file.
d) In "Source" tab, make sure a dependency on geronimo/sharedlib//car is added as below:
    <sys:dependencies>
      <sys:dependency>
        <sys:groupId>geronimo</sys:groupId>
        <sys:artifactId>sharedlib</sys:artifactId>
        <sys:type>car</sys:type>
      </sys:dependency>
    </sys:dependencies>