Solution:How to deploy image resource as jar onto glassfish

My “sum of parts” system prototype uses couple of icons from the ADF RC Demo application . Several of the ChildApps has commandbuttons that need to render with the same icon. After a quick search, I found an article Frank wrote. He describes the exact scenario with a solution that included both design and deployment time solution with the use of “ADF Shared Library” and Weblogic. This all worked fine except when I deploy to my Glassfish sandbox, the images do not show. Upon closer look at the application ear deployment profile, I notice that even thou the jar (containing the images) was added to the project library, it was not included by default upon ear deployment. Hence the quick fix is to select it as shown below.

eardeploymentforjar

My code:

<f:view …
<af:form id=”f1″>
<af:image source=”/adf/images/backarrow.gif” id=”i2″/>
</af:form>
</af:document>
</f:view>

Runtime result on glassfish:

sharedimageresult

Advertisements

About wesfang

www.linkedin.com/in/wesfang/ https://twitter.com/wesleyfang
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s