We generally tend to create multiple applications and re-use them in one
main application by adding them as ADF Library jars.Applications with
ADF Desktop Integration support added to ViewController can also be
This blog is about how to access workbooks in ADF Library jar from a different application(which consumes ADF Library Jar).
: Let's assume that a simple ADF application(TestApp) is created with
Dept and Emp as entities and added as Master Form Detail Table in
jspx.Also an ADFdi enabled excel workbook is created to simulate
DeptView and EmpView as Master Form Detail Table.Publish the
workbook(PBook1.xlsx) and store it in ViewController/public_html/excel/
folder and check for the working of published workbook by re-deploying
Now,let's proceed to the steps to be done before deploying ViewController as ADF Library jar.
web.xml in ViewController->Web Content->WEB-INF of TestApp, in
Filters tab, check for adfBindings and adfdiExcelDownload filters. If
not present add by referring this ADFdi guide.
Create a new deployment profile for ViewController by right-click
ViewController and Deploy->New Deployment profile. Select ADF Library
Jar File as Profile Type and give a profile name like TestAppLibJar
Create a new custom application(ClientApp) with ADF ViewController as project.
Create a FileSystemConnection to import the deployed library jar of TestApp as below:
Resource Pallete, open New File System Connection, give Connection Name
as TestAppConn and for DirectoryPath browse and select the deploy
folder inside ViewController of TestApp application.
Select ViewController of ClientApp, expand the TestAppConn(File System
Connection) created, select TestAppLibJar, right-click and Add to
Project. In Confirmation dialog, click on Add Library,
In ViewController add ADF Desktop Integration support by right-click
ViewController->Project Properties->Features, click on + sign and
move ADF Desktop Integration from Available to Selected.
Add ADF Library Web Application Support into ViewController of ClientApp
by right-click ViewController->Project Properties->ADF View,
select Enable ADF Library WebApp Support checkbox.
Open web.xml and check for the correct ordering of ADFLibraryFilter and
adfdiExcelDownload filter. Make sure adfdiExcelDownload filter is above
Add Initialization Parameter for ADFLibraryFilter with Name
'include-extension-list' and Value
'png,jpg,jpeg,gif,js,css,htm,html,xlsx' as shown in above pic.
Now we will create a jspx page and add Go link with Text 'Download Excel' and Destination '/excel/PBook1.xlsx'
Run the jspx page and click on Download Excel link. Click on Open, and
give yes in Login dialog. There we go, here is our published workbook.