Skip to main content

Posts

Registering custom REST resources to access through Webcenter API's

Hi All, You may have developed your custom RESTful services which you might want to consume by extending the native WebCenter application, Consuming services this way will also secure your services if you can extend the uToken capabilities provided by the Webcenter framework itself which is an interesting implementation which i will save for a different blog post however to consume your custom rest services oracle made it very easy in 12c with just one change in web.xml (Of-course, you should have your rest services built and deployed). Please make the following change within your web.xml to list your resources in the resourceIndex. Add this <context-param>:  <context-param>         <param-name>oracle.jaxrs.config.property.resources.studyResources</param-name>         <param-value>com.mycompany.rest.services.LibraryResource,                       ...

WebCenter Portal Framework 11g Application migration to WCP 12c

As we all know Portal Framework Technology, a technical masterpiece which was used to create and deploy Portal Framework Applications was available in Oracle WebCenter Portal 11g and have been removed by Oracle  starting 12c release. (12.2.1.0.0). So this means starting 12c release development of custom portal applications are deprecated. However, most of the WebCenter Portal API's are still supported by  Oracle  as they are needed to develop custom navigations or taskflows. With the availability of these API's can i run a 11g application in 12c? - No and also depends on the features you're using. - You may be able to run it on server but you can't get it compiled on JDeveloper 12.2.1.x As Portal Framework Technology have been discontinued also the extension for JDeveloper to support Portal Framework applications development have been removed as well so the applications developed in 11g tend to fail with multiple compilation errors due to missing libraries. Ther...

UToken Implementation Extending WebCenter Portal REST: Impl in 11g

I recently got an exciting opportunity my way i.e., to get my hands dirty implementing utoken which adds an additional security to your resources. This is a recommended then sending user's password in plain text using Basic authentication. utoken is kind of a defacto which is used by out-of-box Webcenter Portal REST API to serve each request These tokens are highly secured as they're both generated and validated by the server. Webcenter REST API uses  Jersey  to provide the REST interface Jersey 1.x was part of 11G stack and the latest 12.2.1.3 got upgraded to Jersey 2. However 11g was sweet with kind of straight forward implementation as we had Webcenter Portal Framework Extension available for JDeveloper which provided the following libraries. This is very less spoken outside so I would like to share with you: Now create your resource in PortalExtension project: Add the following entries in web.xml: <?xml version = '1.0' encoding = 'UTF-...

Cheat sheet - Linux Commands

Collection of linux commands used frequently: Add user: adduser <username>  (works if logged in as root account or with a superuser account) Change permissions to user: usermod -aG sudo <username> Switch to specific user from root: su - <username> Make directory and change permissions: mkdir <dirname> chmod <permission_num> <dirpath> Editor to view files: nano <file-path> vi      <file-path> tail -f <file-path> Find files: find <path> <file-name/pattern>; Find jar files with name: find . -name '*.jar' -exec grep -Hls "<pattern>"{} \;

Adf Resources

Here's the list of few docs and blogs from some amazing people who have been contributing to community for a long time: Oracle 11g docs Oracle Jdev 12c docs ADF Code Corner Jobinesh blog AMIS blogs Ashish Aswathi Blog FusionMinds ADF blogs Zeeshan baig ADF blog Andrejus ADF blog Shay blog A-Team Chronicles

ADF Best Practices: Let's do it better

We may happen to implement things in the wrong way and see an expected output, which may break or degrade the performance of the application later. I planned to blog the best practices i come across everyday and from resources  i follow. Also i'll be more than happy if you can contribute to this project or correct me through comments: 1. Do not prefix managed bean EL expression every-time with a specific scope: Sometimes it's good to not specify scope when referencing managed beans in expression language. Never prefix for default servlet scope (requestScope, sessionScope and applicationScope). By prefixing the scope you bypass the JavaServer Faces managed bean facility(handles creation and initializing of managed beans). When scope is prefixed it will only look for in-memory objects and does not instantiate managed beans possibly throwing an NPE. ADF specific scopes (backingBeanScope, viewScope and pageFlowScope) should've a prefix. These scopes are handled by the ADF c...

HTTP vs HTTP/2

HTTP was first proposed by Tim Berners Lee in 1990 and many websites follow the same till today. As Google's SPDY got introduced in 2009 with few advancements, HTTP/2 seems like a response to SPDY. Before I dive into the main differences let me recollect the basic concepts like What is HTTP/ HTTP2? or What is protocol? Protocol: Protocol defines the rules for data communication mechanisms between clients and servers. Three basic components that makes a protocol are: Header -- Provides info on size, type, source and destination addresses. Payload -- Actual message transmitted using protocol. Footer -- Similar to header, contains control fields. Two most often used commands over HTTP :  Get - Requests data from a specified resource. Post - Submits data to be processed to a specified resource. Other methods include: HEAD - gets HTTP headers PUT - Uploads a representation of the specified URI DELETE - Deletes specified resource OPTIONS - Returns HTTP methods...