Beginning Oracle WebCenter Portal 12c provides an overview of the architecture behind Oracle WebCenter Suite and the Oracle Fusion Middleware platform. Sample code written in Java is included along with best practices developed from the authors’ experience of using Oracle WebCenter Portal for building enterprise portals.
What you will learn:
Enterprise Portal and Oracle WebCenter Portal concepts
Basic administrator knowledge
Basic developer knowledge
Overview of the tools and services offered by Oracle WebCenter Portal
How to develop Portal Assets using JDeveloper IDE
How to develop new components(Portlets JSR-286 and ADF Task Flows) using JDeveloper IDE
REST API Integration with Portal
WebCenter Portal Java API
Integration with OBIEE, EBS and third party applications
Who this book is for: Target audience will be developers, architects, project managers and portal administrators in the Oracle Fusion Middleware (FMW) area. IT professionals working in FMW or WebLogic stack can also make use of this book.
Yes, it will release next month and will be available in all major book stores and online.
Enter key as “oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS “and value as “true”. Please set three properties as following and click invoke
Setting rest(last) two properties as above. Unless using non-default values, the last two properties are optional.
# Enable caching of FMw Discovery data and use it for other subsequent users.
# Values=true/false Default=false oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS=true
# If caching of discovery data is true, this parameter indicates how long the discovery data
# from cache should be used before requiring a fresh discovery.
# Time value is in milliseconds. Default is 7200000 milliseconds. oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE=7200000
# If caching of discovery data is true, a user logs in and a discovery session is in progress,
# this parameter indicates how long the user can wait for current discovery to complete.
# After this wait time is elapsed and discovery is still not finished: If there is already data
# in cache it will be used, else the user will launch a new discovery session.
# Time value is in milliseconds. Default is 10000 milliseconds. oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME=10000
After target is set and refresh farm and that’s it
File upload in Oracle ADF is done with af:inputFile component.
To implement file upload functionality, follow the below steps:
1. add af:inputFile component to the form.
2. set usesUpload property of the af:form element to true.
3. create binding of inputFile and its valueChangeListener in managed bean.
4. write code to implement file upload and display its content in text area as shown in below example:
Now if you want to have validation then you do validation for file type,file size or any other validations in ValueChangeListener. One of biggest problem is , in large applications, File will be uploaded to a temporary location and if the ere is large user then huge sizes of files will be stored in server location. That can create issue.Because ADF Faces will temporarily store incoming files (either on disk or in memory), by default it limits the size of acceptable incoming requests to avoid denial-of-service attacks that might attempt to fill a hard drive or flood memory with uploaded files. By default, only the first 100 kilobytes in any one request will be stored in memory. Once that has been filled, disk space will be used. Again, by default, that is limited to 2,000 kilobytes of disk storage for any one request for all files combined. Once these limits are exceeded, the filter will throw an EOFException . Files are, by default, stored in the temporary directory used by java.io.File.createTempFile() , which is usually defined by the system property java.io.tmpdir . Obviously, this will be insufficient for some applications, so you can configure these values using three servlet context initialization parameters:
<!-- Maximum memory per request (in bytes) -->
<!-- Use 500K -->
<!-- Maximum disk space per request (in bytes) -->
<!-- Use 5,000K -->
<!-- directory to store temporary files -->
<!-- Use an ADFUploads subdirectory of /tmp -->
<!-- This filter is always required by ADF; one of its functions is
file upload. -->
. Ideally, we should have client side validations , which will ignore all irrelevant files.
So if you use this component, you should delete your file after cancel upload process or after persist the file from temporary locations.
So today, we will discuss another approach for bypassing this scenario. We will use one jquery plugin to have client side validation for size, extension etc.
I will be using this jquery plugin , There are many, you can choose anyone.
Lets look at implementation now
This will be my jspx page
First thing, you need to include css and JS file as below
var pathArray = window.location.pathname.split('/');
var secondLevelLocation = pathArray;
var url = '/'+pathArray+'/GetFileServlet'; // this will give you post method call to this url
$(document).ready(function() // standard jquery ready function
allowedTypes:"jpg,bmp,ppt,pps,pptx,pdf,TXT,txt,doc,docx,rtf,odt,zip,xls,xlsx", // you can define allowed extension type.
showDelete: true, // if you want to show delete icon for each uploaded file
maxFileSize:50000*1024 // add maximum upload size for file.
We will add div as below
When you upload then call will go to GetFileServlet , which is mapped in web.xml .
I am also using Apache common file upload to handle multitype request.
You can store these document in db, webcenter content using RIDC. for sample purpose, I am storing these documents in file store
in C drive.
You also need to define mapping of servlet in web.xml as below
Now run the application.
Now select some files and upload
great. File uploaded to system.
now upload some invalid file,I tried file with eddx extension and you will get validation happened on client side.
Now try uploaded with large file. I reduce the size limit
Storing file is file system is just for demo. You should store these files in webcenter content using RIDC.
So it is very simple and easy to use and give lot of freedom to use following features.
jQuery File upload plugin has the following features.
Single File Upload
Multiple file Upload (Drag & Drop)
Sequential file upload
Sending Form Data
Adding HTML elements to progressbar
Delete / Download Uploaded files
Show previous uploads
Well that all. Happy uploading in ADF/webcenter.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.