Congratulations! Now that you’ve implemented Pro Tips #1 & #2 (and your Java libraries and XMLs/JSPs are customized), it’s time to execute Pro Tip #3 and become a master at customizing, implementing (for your visitor site), and deploying static files.

For Contributor UI customization:

Any changes done to OOTB static file(s) to customize OWCS Contributor UI are usually deployed in extend.sites.webapp-lib.war. You can refresh your memory about this Pro Tip #1 here: https://www.inspiredecm.com/pro-tip-1-customize-java-libraries-in-oracle-webcenter-sites-12c/. Here is the step-by-step procedure to deploy a custom CKEditor config file:

  • Shut down the Weblogic managed server
  • Backup the sites-home/extend.sites.webapp-lib.war library file
  • Unjar the sites-home/extend.sites.webapp-lib.war file to a temp folder
  • In the temp folder, add a new “ckeditor” subfolder
  • In the “ckeditor” subfolder, add a custom CKEditor config file with a different name, such as config1.js, which contains custom configuration
  • Rejar the temp folder as sites-home/extend.sites.webapp-lib.war
  • In Weblogic console > Deployments section, “Update” the extend.sites.webapp-lib library with the updated sites-home/extend.sites.webapp-lib.war file
  • Start the Weblogic managed server
  • Now, in the Sites UI, for your CKEditor xml definition, you can use the CONFIG parameter to reference the custom config1.js file

Examples:

<?XML VERSION=”1.0″?>

<!DOCTYPE PRESENTATIONOBJECT SYSTEM “presentationobject.dtd”>

<PRESENTATIONOBJECT NAME=”FCKEditorTest”><CKEDITOR WIDTH=”580px” HEIGHT=”200px” CONFIG=”config1.js”></CKEDITOR></PRESENTATIONOBJECT>

For Visitor Site Implementation:

Static files related to a site implementation must be packaged and deployed as a separate war file in Oracle WebCenter Sites 12c (unlike 11g where they are deployed as independent files). The step-by-step procedure is as follows:

  • Create a project folder and place all the static files, namely css, js, icons, images etc.
  • Create a web.xml inside WEB-INF folder and generate a WAR file

Examples:

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/j2ee/dtds/web-app_2_3.dtd“>

<web-app>

</web-app>

  • Login to Weblogic console –> Deployments –> Click on Install and upload the WAR file created above.
  • Note: Deploy as an application
  • You should be able access the files from your JSP, like: http(s)://<host>:<port>/<project folder>/<file name>

Note:

√  HTML files located inside WEB-INF are not accessible to users over http

√  HTML files located on the same level as WEB-INF are accessible to users over http

Thanks for joining us for this 3-Tip series! Stay tuned for many more tips in the future. Speaking of the future, the December Premier Support deadline is rapidly approaching and you don’t have to go through the upgrade alone! Contact us at Inspired ECM to let our experienced consultants upgrade your Oracle WebCenter Sites environment from 11g to 12c so you can start enjoying all the new features and benefits today.