Coremedia 2008 – Rookie Boot Camp

Prerequisites

  • A DB which is capable to use character encoding UTF-8. Well suited and used here is Oracle XE
  • Access to the coremedia software. You must have an coremedia account and a valid license to walk through this tutorial.
  • Masochism!

Installation and preparations Step-By-Step

  • Download Coremedia 5.2
  • Start the installer with
    java -jar cap-5.2.1259.jar
  • At the DB-Settings-Dialog enter XE as SID not CM
  • Put the Oracle JDBC-Driver into <INST_DIR>\lib
  • After that go to your Oracle DB and create a ne USER (COREM/COREM) with the Oracle Admin Console
  • Adjust your JAVA_HOME at
    • <INST_DIR>\bin\preconfig.jpif and
    • <INST_DIR>\jakarta-tomcat\bin\preconfig.jpif
  • Start the contentserver with „<INST_DIR>\bin\cm contentserver run“ and examine the output under <INST_DIR>\var\log\contentserver.log
  • Start the coremedia editor with „<INST_DIR>\bin\cm editor start“ and login with admin/admin

Aktivate the sample doctypes

  • Goto <INST_DIR>\config\contentserver\doctypes and open sample-doctypes.xml.
  • Remove the commented out doctypes and save the file.
  • Stop and Start the contentserver and the editor again.
  • Do you see some changes?

Prepare the CAE

  • Generate the „ContentBean“-Classes from the new DocTypes
    • Goto <INST_DIR>\jakarta-tomcat\webapps\contentapplicationengine-template\WEB-INF\lib
    • Start the BeanGenerator with: java -jar beangenerator.jar -d <INST_DIR>\config\contentserver\doctypes\sample-doctypes.xml -o ..\classes -p net.payback -beanmapping ..\spring\cae-contentbeans-test123.xml -generics
    • check ..\spring\cae-contentbeans-test123.xml
  • Compile the classes.
    • Goto <INST_DIR>\jakarta-tomcat\webapps\contentapplicationengine-template\WEB-INF\classes\net\payback
    • Start the compiler: <INST_DIR>\bin\cm javac Look.java LookBase.java LookImpl.java Picture.java PictureBase.java PictureImpl.java Text.java TextBase.java TextImpl.java
  • create a new Directory: <INST_DIR>\jakarta-tomcat\webapps\contentapplicationengine-template\WEB-INF\templates\net.payback
  • Put your first template in: Text.jsp
  • Supply this simple code and save the file:
<h2>${self.titel}</h2>
 ${self.text}

First Testdrive

  • Prepare Tomcat
    • Goto <INST_DIR>\jakarta-tomcat\conf and open tomcat-users.xml
    • Add the role <role rolename=“manager-gui“/> and associate it with the user tomcat
      <user username=“tomcat“ password=“tomcat“ roles=“tomcat,manager-gui„/>
    • Start Tomcat with <INST_DIR>\jakarta-tomcat\bin\cm httpd run
    • Check the tomcat-manager (http://localhost:8001/manager/html) if the app /contentapplicationengine-template is running.
    • Go to the Coremedia Editor and create a directory „Payback“ and a new resource of type „Text“.
    • Supply a Title and a Text.
    • Save the new resource.
    • While the resource is still selected in the editor hit the blue (i)-Button and copy the id from „ID: coremedia:///cap/content/104“ (example)
    • Now have a look on it here: http://localhost:8001/contentapplicationengine-template/servlet/content/104

    => Next we examine some files underneath the <INST_DIR>\jakarta-tomcat\webapps\contentapplicationengine-template\WEB-INF\ Directory

Advertisements
Dieser Beitrag wurde unter Uncategorized abgelegt und mit verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden / Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden / Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden / Ändern )

Google+ Foto

Du kommentierst mit Deinem Google+-Konto. Abmelden / Ändern )

Verbinde mit %s