Showing posts with label Webcenter. Show all posts
Showing posts with label Webcenter. Show all posts

October 16, 2014

Convert an image to Base64

This post is to show how to generate base64 string to an image file.

Below is the method which will return the base64 string to the given image file.
The input for this method is the full path of the image.

    public String getBase64ForFile(String inFile) throws Exception {
        String base64 = "";
        System.out.println("inFile: " + inFile);
        URL url = new URL(inFile);
        InputStream fin = url.openStream();
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        int next = 0;
        while ((next = != -1) {
        base64 = "" + org.kobjects.base64.Base64.encode(bos.toByteArray());
        System.out.println("Base64: " + base64);

        return base64;

October 12, 2014

How to enable Contribution Folders in Webcenter Content

If the “Contribution Folders” under Browse Content is not visible, please follow the below procedure to enable it.
  • Login to webcenter content
  • Under Administration menu, go to Admin Server and select “Component Manager” option
  • Select “advanced component manager” option

  • Under disabled components, select “Folders_g” and click on enable button
  • Please note that, while enabling “Folders_g”, if “FrameworkFolders” is enabled, then disable it, because both the options should not be enabled. Either of those should be enabled at a time
  • Now, you will see an alert message to restart the server
  • Restart the content server
  • After restart, if you login to webcenter content and go to “Browse Content”, you can see the “Contribution Folders”

November 20, 2012

Create or Configure a Pagelet

Below is the procedure to create/configure the pagelet.        
  • Create a portal application and deploy in an application server
  • Login to Pagelet producer. http://<host>:<port:>/pageletadmin
  • In the Navigator select option “Producers” for “Jump to” from the list, will display screen like below
  • Click on Register button, a screen like below will be displayed
  • Enter required fields like Producer Name, WSDL url of the portlet 
  • Click on Test button and then Click Ok 
  •  Now the pagelet is registered which can be viewed in Resources
Consume Pagelet

Pagelet can be consumed in two ways.
1)      Using java script code generated by the pagelet producer
a.       In the Navigation tab, Jump to “Resources” option
b.      From the resources listed, select the registered pagelet and navigate to “Documentation” option as shown in the below screen

c.       Copy the Java Script given for the pagelet and paste in any html or web page, the pagelet will be consumed while running the web pages
2)      By creating a new connection to the pagelet producer in ADF application
a.       Go to Application Resources
b.      Right Click on Connections and select “Pagelet Producer…” option from the list of options available for New Connection

c.       It will display all the registered pagelets in the given pagelet producer
d.      Select the required pagelet and drag & drop on the JSF page as a region

November 16, 2012

Configuring Discussion Server to Webcenter Spaces

Below are the steps to configure the discussion server with webcenter spaces

          1)      Open the EM console: http://<host>:port/em
          2)      Go to “Service Configuration” Option in Webcenter domain as shown in the below screen
           3)      Select “Discussions & Announcements” from the list available

           4)      Click on Add button, you will get the below screen

           5)      Enter details in the screen as shown below

           6)      Make sure you are giving correct address for Server URL and admin user of the discussion server

           7)      And also check policies if you required to any specific one from the list

           8)      Click on Test and then Click on OK

           9)      Restart Spaces managed server for that host

Verifying Discussion Service in Spaces

By following the below steps, you can confirm that the discussion server is configured to webcenter spaces.
           1)      Login to webcenter admin: http://<host>:8888/webcenter
           2)      Go to Administrator àConfiguration àServices
           3)      You can see a Service named Discussions
           4)      Click on the “Discussions” service, will display their settings