Visualizzazione post con etichetta ssxa. Mostra tutti i post
Visualizzazione post con etichetta ssxa. Mostra tutti i post

mercoledì 23 gennaio 2013

JDeveloper: Deploy your project to an external WebLogic Server

JDeveloper by default uses it's internal WebLogic Server to deploy your projects.
When your project is completed presumably you will deploy your application to a production WebLogic Server.

In this post I explain how to create a deployment profile and deploy your project to an external WebLogic Server. I use the previously created SSXA webpage sample as reference but the procedure is the same for other applications like ADF ones.

First step is optional. I will change the default web context root name to a more easy one. By default JDev assigns web context root names like "You_App_Name-Project_Name-webapp" that will be used as root folder for project, this meas that the resulting url could be not so simple to remember.





To change this name right click your Project in Application Navigator -> Project Properties -> Java EE Application and modify values as you like.



So, let's start deploying our app.

Right click your app -> Deploy -> New Deployment Profile



Select Deployment Profile -> WAR File



Choose a name for your application and click OK twice on settings screens to use default settings.

Go to Application -> Deploy -> New Deployment Profile



Under Deployment Profile select EAR File



Under Application Assembly check your app then click OK




Click OK again to following screen to use default deployment settings.

Finally go to Application -> Deploy -> YOUR_DEPLOYMENT_NAME




Here you can choose between two deployment options:

1)Deploy to EAR file to be manually deployed to an external WebLogic Server

2)Configure an external WebLogic Server to allow JDeveloper to perform all tasks for you.

Option 2 is for sure the faster one just select Deploy to an Application Server and you will be prompted to configure an external WebLogic for deployments.



In this post though I will follow option 1 performing a manual deploy.

Select Deploy to EAR



Your EAR packaged application will be created somewhere on your hard drive, if you open Deployment tab in the bottom screen of JDev you will see a log containing where the file has been saved.

In my case my saving location is

C:\JDeveloper\mywork\Test_SSXA\deploy\application.ear

Login to your WebLogic Server that probably will have an URL similar to this:

http://weblogicserver_ip_address:7001/console

Click Deployments -> Lock & Edit -> Install


Click upload your file

In Deployment Archive select your EAR file then click Next



Click Next -> Next, then select the target you are deploying the application to: select AdminServer and click Next, choose a different name, if you like to, for your app then click Next -> Finish

Click Activate Changes



Return to Deployment page, select your application, click Start -> Service all requests




At this point your application will start servicing requests.

Go to:


http://weblogicserver_ip_address:7001/You_App_Name-Project_Name-webapp/appName/index.html

In my case:

http://10.0.0.4:7001/testSSXA/DemoSSXA/index.html


That's all!!

martedì 22 gennaio 2013

Oracle UCM: Site Studio for eXternal Applications (Part 3)


Today another post about creating a sample webpage using Site Studio for eXternal Applications.

As explained in Oracle UCM: Site Studio for eXternal Applications (Part 1) SSXA differs from Site Studio because it allows webpages to be delivered by WebLogic Server while content is still served by UCM (WebCenter Content).

SSXA allow us to create richer JSP/JSPX web pages using JDeveloper IDE instead of the simplicistic Site Studio Designer.

In this post I will walk you through the creation of a simple webpage, the same webpage created in yesterday's post with Site Studio Designer. In this way you can compare which approach (Site Studio or SSXA) best suits you.

Let's start opening JDeveloper, File -> New



Choose project name and select Site Studio Technology components


Right click Connections -> New Connection -> Site Studio



Insert UCM server details and login informations, test connection and if you are able to perform login click OK. Right click on connection and select Add to Project


Double click wcm-config.xml and create a new site


It could be useful to verify that Site Studio is correctly configured in UCM. Login to your UCM instance, go to site studio administration and verifyif  default metadata assigned to the content are correct.


Edit weblogic.xml and in Security tab insert a new role called WCMContributor mapped to weblogic user. In this way we tell WebLogic that weblogic user can enter contribution mode.


Create a new region template, right click on WebContent -> Templates -> region and select New.


Choose new JSP page and name it rt_wysiwyg, check Create as XML Document (.jspx). Select rt_wysiwyg as Site File ID and choose the region definition


Now  we need to select from the elements available in the region refinition that is associated with the region template. Right click on a new line just before the ending of jsp page, select Site Studio -> insert Element


Create a new placeholder definition


Select region definition and region template associated with this placeholder definition


Now go to Web Content ->  WEB-INF -> sites -> your_site_name.xml. Insert your placeholder definition under Default Placeholder Definition and insert WCM_Designer under Designer Mode Role



Under Web Content -> Templates  right click on pages to create new JSP page.


Name it pt_main, once page template is created go to Web Content ->  WEB-INF -> sites -> your_site_name.xml right click Home, Select Primary Page Template and choose the template just created.



Return to your page template, go to Source view and paste this code:

<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
  <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
  <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  <html>
    <head>
      <meta http-equiv="Content-Type"
            content="text/html; charset=windows-1252"/>
      <title>Site Studio for eXternal Applications Sample Page</title>
    </head>
    <body>
    <h1>Hello Contributor!!Leave me a message...</h1>
    </body>
  </html>
</jsp:root>


Insert an empty line under <h1>Hello Contributor!!Leave me a message...</h1> and in Component Palette on right of JDeveloper choose Site Studio and select Placeholder. Assign a name to placeholder and click OK.


Now it's time to run our webpage. Let's right click on startyour_site_name.jspx and select Run


WebLogic server will start on your machine and if everything went fine your dfault browser wil automatically start presenting you the webpage just created.

To enter contribution mode press CTRL+SHIFT+F5 and login using:

username:weblogic
password:weblogic1

Click on placeholder and select add content to add a new contributor data file to our webpage. You will be prompted to checkin a new xml data file which will be used by default by contributors.


Once data file is created you can edit it, click on placeholder and edit data file as you like, then once finished click save.


This is the end of part 3. I hope this example could help you decide which approach utilize when implementing a website which relies on content stored in UCM.
In a future post I will explain how to insert new features to webpages like dynamic document conversion: a feature that enables to insert and convert Office documents (like .doc or .xls) directly in viewable webpages.

That's all!!

mercoledì 16 gennaio 2013

Oracle UCM: Site Studio for eXternal Applications (Part 1)


In a series of posts I would like to share some informations about Site Studio for eXternal Applications (SSXA).

As you probably know Oracle UCM provides the capability of delivering documents and related contents (images, videos, etc.) in web pages using dynamic elements such as WYSIWYG editors, dynamic conversion of Office documents into browser-viewable content, workflow approvals for contributions and so on.

This feature is managed in UCM by enabling Site Studio Component. (See NOTE at page bottom)

A further step is introduced by Site Studio for eXternal Applications that basically is a set of plugins enabled in JDeveloper which allow the separation of "web pages" and "content" leveraging WebLogic Server for serving web pages.

I explain myself better:

Site Studio uses Oracle UCM for serving both web pages (i.e. the structure of a page, like the layout of the page) and content (informations presented in web pages such as text/images/videos,etc.).


Site Studio for eXternal Applications uses WebLogic Server for serving web pages while contents are still stored in and delivered by Oracle UCM.


In this post I will explain the prerequisite configuration to start using SSXA. Since all webpages will be created using JDeveloper first you need to download it. I use version 1.1.1.5.0 due to SSXA plugin incopatibility with newer JDeveloper version. I can't confirm if newer versions of JDeveloper would work.

Install JDeveloper 1.1.5.0

Get JDeveloper libraries and copy them to your PC: 

oracle.ucm.ridc.jdev-11.1.1.zip

oracle.ucm.wcm.jdev-11.1.1.zip


They are located in your UCM server. Mine are located here:

/home/oracle/Oracle/Middleware/Oracle_ECM1/ucm/Distribution/RIDC/jdev/oracle.ucm.ridc.jdev-11.1.1.zip

/home/oracle/Oracle/Middleware/Oracle_ECM1/ucm/Distribution/SiteStudioExternalApplications/jdev/oracle.ucm.wcm.jdev-11.1.1.zip



Next step is to install libraries in JDeveloper:

Open JDeveloper, click Help -> Check for Updates -> Source -> Install from Local File



Select oracle.ucm.ridc.jdev-11.1.1.zip first, restart JDeveloper, then install oracle.ucm.wcm.jdev-11.1.1.zip


JDeveloper is now configured to work with Site Studio.


In the following post I will explain how to leverage WebLogic server to host a website that includes document and assets from Oracle UCM.


NOTE: To enable Site Studio component login to your UCM as admin, click Admin Server





Click advanced component manager


Under Disabled Components enable all three Site Studio components


Restart UCM service

That's all!!