Setting Up a Development Environment in Oracle WebCenter Sites


Function1 would like to take this opportunity to welcome Mike Field (co-author of this blog) to our Web Experience Management team.  Mike joins us from Metastratus Web Solutions and brings in-depth expertise in all aspects of Oracle WebCenter Sites.  Mike and I worked together on creating a development environment in Oracle WebCenter Sites for a client and decided to document the process.

As all of us enthusiastic developers know, setting up an initial development environment can sometimes be a tedious and painstaking process, regardless of the platform or software we use.   It can take trial and error, and documenting the correct process is key to more efficient setups in the future.

We want to start coding, but all the setup and configuration steps always get in the way!

This blog post will outline a detailed, step-by-step guideline to set up an Oracle WebCenter Sites (OWCS) development environment that runs on Tomcat, connects to a Bitbucket version control system using Git, utilizes the GSF (GST Site Foundation), and integrates with Eclipse and the Content Server Developer Tools (CSDT).

  1. Install a fresh OWCS JumpStart Kit (JSK), with no sample sites
    • The JSK could be a fresh local installation of OWCS
  2. Start the JSK
  3. Create a new ContentServer (CS) workspace in Eclipse
  4. Open eclipse, switch to Oracle WebCenter Sites (or ContentServer) perspective
  5. Connect to the JSK (it will prompt you for the project name)
    • The new CSDT workspace will always default to the directory "<ContentServer_Root>/export/envision/cs_workspace"
  6. Once connected to the JSK via CSDT, continue
  7. Rename the "/cs_workspace/" folder to "/cs_workspace_old/"
  8. Create a new, empty "/cs_workspace/" folder
  9. Switch to Git perspective in Eclipse
  10. Clone an existing remote repository
  11. The destination for this clone should be your new, empty "/cs_workspace/" folder (if need be, delete the ".project" file).  Other than that, accept all the defaults.  This will download all files from the remote repository onto your local machine.
  12. Copy the ".classpath" and ".project" files from your old "/cs_workspace_old/" folder into the new one
  13. Back in Eclipse, change back to the Oracle WebCenter Sites (or ContentServer) perspective
  14. Right-click on project in the Project Explorer in Eclipse
  15. Select Team --> Share Project
  16. Choose Git
  17. If available, check the box for "Use or create repository in parent folder of project"
  18. Select a ".git" file that points to the repository you cloned in your local CSDT workspace (<ContentServer_Root>/export/envision/cs_workspace)
At this point, we’ve connected our local CSDT workspace to a remote Bitbucket repository via Eclipse.   The next steps involve importing all elements (from our local CSDT workspace) into our JSK, but we also have to account for the GSF!
Check out Dave Chesebro’s blog to understand why the following steps involving exporting from the CSDT and installing the GSF need to be run in a specific order, as outlined below.
At the time of this blog, we are using GSF version 11.6.0.
  1. Switch back to Oracle WebCenter Sites (or ContentServer) perspective and begin syncing data to WebCenter Sites
  2. Import ONLY the following: ("Sync to WebCenter Sites"):
    • <YourSite> and GST Sites (@SITE)
      • Login to the JSK and via the WEM Admin interface, add user 'fwadmin' (or whatever admin user you want) to <YourSite> as well as the GST site
      • Assign ALL Roles to user 'fwadmin'
    • All Asset Types (@ASSET_TYPE)
    • All GSTDefinitions
    • All GSTAttributes
  3. Install the GSF, which is just the steps:
    • Deploy the GSF jar file "gst-foundation-all-11.6.0-SNAPSHOT.jar" into Tomcat’s "/webapps/cs/WEB-INF/lib" directory
    • Copy the GSF folder "/web-resources/gsf/" into Tomcat’s "/webapps/cs/" folder
    • Use CatalogMover to auto-import the file ""
    • Back in the JSK, via the GSF interface, run the GSF WEM App Installer ("Install/reinstall GSF components")
    • Restart Tomcat
  4. Login to <YourSite> in the Admin interface
  5. Enable any Asset Types required for <YourSite>. Do NOT create any new Start Menus (we'll import them later)
  6. Back in Eclipse in the Oracle WebCenter Sites (or ContentServer) perspective, import all Roles (@ROLE)
  7. Import all @ELEMENTCATALOG elements
  8. Import all assets (anything without an @ symbol in front of it, or @ALL_ASSETS)
  9. Import all @TREETAB elements
  10. Import all @STARTMENU elements
  11. Import all AttrType elements (if you haven't already)

And there you have it!  Our local JSK now has all required elements imported to it from our local CSDT workspace, and we can run <YourSite> in order for it to be used in development!

Verify that all Git functionality in Eclipse cooperates with your remote repository in Bitbucket.  In particular, some hints:

    • First do Team > Commit
    • Then do Team > Push Upstream
    • First do Team > Fetch From Upstream
    • Then do Team > Pull

Good luck, and please let us know if you have any questions!

Subscribe to Our Newsletter

Stay In Touch