How to deploy Blojsom blogging application on standalone OC4J

Here is the steps to deploy the blojsom blogging application on Oracle Container 4 J2EE.

  1. Download the WAR file for blojsom (http://sourceforge.net/project/showfiles.php?group_id=72754)

  2. Copy blojsom.war to it's own directory, without any other files in it.

  3. Make subdirectory META-INF

  4. cd META-INF

  5. Create/edit application.xml -file with following content:

  6. <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

  7. Create an EAR file out of the directory:

  8. <path_to_your_jdk_home>\jdk\bin\jar cvf blojsom.ear *
    You should see something like:
    added manifest
    adding: blojsom.war(in = 2493553) (out= 2449558)(deflated 1%)
    adding: web-inf/(in = 0) (out= 0)(stored 0%)
    adding: web-inf/application.xml(in = 387) (out= 240)(deflated 37%)
  9. Copy this *.ear file to OC4J_HOME/applications -directory

  10. Edit OC4J_HOME/config/server.xml

  11. Add following line under the application-server -root element:
    <application name="blojsom" path="../applications/blojsom.ear" auto-start="true" />

  12. Edit OC4J_HOME/config/http-web-site.xml

  13. Add following line:
    <web-app application="blojsom" name="blojsom" load-on-startup="true" root="/blojsom" />

  14. Start the OC4J server

  15. Auto-deployment should start at this point.
  16. Edit OC4J_HOME/applications/blojsom/blojsom/WEB-INF/default/blog.properties

  17. Change the blog-base-url and blog-url to point to your server and OC4J port.
    Change also other meaningful descriptive parameters to match your needs.
  18. Shutdown the OC4J and restart it.

  19. Point your browser to url http://localhost:8888/blojsom/blog/default/

No comments: