Running webcenter related wlst command from wlst.cmd or wlst.sh

Requirement- If you execute webcenter related admin commands (like export or importWebCenterApplication) in windows environment by using this -JDev\oracle_common\common\bin\wlst.cmd

and you run into name not found error.

That means its not able to find this command, because it doesn’t have the right jars.

Solution –
Modify the setwlstenv.cmd file and add %COMMON_COMPONENTS_HOME%/oracle_common/common/wlst/lib/webcenter-admin-commands.jar

%COMMON_COMPONENTS_HOME%= Jdev Home

After adding this simply run webcenter related commands.

Happy wlst with vinay in techartifact.

Change configuration file with webcenter portal.

For editing web.xml old solution will work for 11.1.1.7 but for 11.1.1.8 you can use this solution.You should use WebCenter Portal Server Extension.

< In this case you must create a new application using the new JDeveloper template: WebCenter Portal Server Extension. a href=”https://www.techartifact.com/blogs/wp-content/uploads/2015/08/1.png”>1

This template will create two projects (that can be named during the creation).

PortalExtension: To add custom code, task flows and beans to WebCenter Spaces.
PortalSharedLibrary: Similar to the former WebCenterSpacesExtensionLibrary; however, deployments are now done using JDeveloper Deployment tools and the versioning is managed by manually modifying MANIFEST.MF
Taking a look into PortalSharedLibrary it contains only a MANIFEST.MF file used for versioning of deployments.

​​2

Where are weblogic.xml and web.xml descriptor?

These files should be generated manually.

To create a weblogic.xml create it as New WebLogic Deployment Descriptor.

3

4


In case of web.xml create it as New Java EE Deployment Descriptor:

5

1


By default, web.xml and weblogic.xml will be part of the deployment. It shouldn’t be configured at the deployment profile.

Now deploy as shared lib in WC_Spaces. It will overwrite extens.spaces.webapp shared lib then restart server. Changes will reflect

Thanks. Happy Coding with Vinay.

Custom session timeout warning popup in Webcenter portal 11.1.1.8 using jquery

Hi All,

Requirement – To show customised session time out warning popup in webcenter portal builder.

Solution- Edit your template-

editpagetemplate

In the composer, open web development and add an html markup anywhere in the template.
Edit that markup and add below code as the value.

Below snippet uses normal javascript.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dialog Box Witout Close Button</title>


</head>
<body>
<div id="dialog"  title="Dialog Title"></div>
<script>
var resetTime_int;
function resetTimer(){
    if(resetTime_int) window.clearTimeout(resetTime_int)
    resetTime_int=window.setTimeout(function (){
    if(document.getElementById('dialog').innerHTML = 'You have ' + (timeoutCount * 3000)/1000 + 'seconds until timeout' ;)     
    location.reload()
    }, 1000*60*2)
}

resetTimer()
document.onmousemove=resetTimer
document.onkeyup=resetTimer
</script>
</body>
</html>

html

Following snippet with Jquery

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dialog Box Witout Close Button</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>

</head>
<body>
</head>
<body>
<div id="dialog" style="display:none;" title="Dialog Title"></div>
<script>
var lefttime=3;
var interval;
interval = setInterval('change()',60000);


function change()
{
   lefttime--;
   if(lefttime<=2) {
$( "#dialog" ).dialog( "open" );
return false;

}
}
$("#dialog").dialog({
autoOpen: false,
position: 'center' ,
title: 'session',
draggable: false,
width : 400,
height : 200,
resizable : true,
modal : true,
});

JS

With jquery you can make it more beautiful with these dialog options.

Thats it. You can change the time to show popup for idle user.

Happy learning with Vinay in techartifact