How to include custom application.xml in JDev9i project

Can anybody explain to me how to include a custom application.xml file when deploying to an .ear file? I need to include application wide security roles, and I can't see where in Jev9i how to do this.
After searching this forum, I see that jdev9i can't include the orion-application.xml, but I want to include just the standard J2EE application.xml. Is this possible?
Thanks,
matt

The standard application.xml file unfortunately can't be customized in JDev 9.0.2. The reasons why this capability was left out of JDev 9.0.2 are same reasons why the other EAR-level XML files were excluded. The OTN thread
Re: Regarding 11i and E-business suite
has a summary of those reasons, which you've probably seen. We know this is an area in need of improvement and will be adding this functionality in the JDev 9.0.3 release. Until then, you'll have to go with a work-around like an Ant build file, batch file, Java application, or some other kind of script.
Below is a sample Java application which can be used to insert <security-role> elements into an EAR file's application.xml. Modify the main() method to customize for your purposes, and put xmlparserv2.jar on the classpath (in a JDev project, add the "Oracle XML Parser v2" library):
package mypackage4;
import java.io.*;
import java.util.*;
import java.util.zip.*;
import oracle.xml.parser.v2.*;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
public class PostProcessEAR
public static void main( String[] args ) throws IOException
final String earFile = "C:\\temp\\myapp.ear";
final PostProcessEAR postProcess = new PostProcessEAR( earFile );
postProcess.addSecurityRole( null, "first_role" );
postProcess.addSecurityRole( "Description for the second role", "second_role" );
postProcess.commit();
System.out.println( "Done." );
private final File _earFile;
private final ArrayList _securityRoles = new ArrayList();
public PostProcessEAR( String earFile )
_earFile = new File( earFile );
public void addSecurityRole( String description, String roleName )
if ( roleName == null )
throw new IllegalArgumentException();
_securityRoles.add( description );
_securityRoles.add( roleName );
* Write out modified EAR file.
public void commit() throws IOException
if ( _securityRoles.size() == 0 )
return;
final ZipFile zipFile = new ZipFile( _earFile );
final Enumeration entries = zipFile.entries();
final File outFile = new File( _earFile.getAbsolutePath() + ".out" );
final ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( outFile ) ) );
while ( entries.hasMoreElements() )
final ZipEntry entry = (ZipEntry) entries.nextElement();
final InputStream in = zipFile.getInputStream( entry );
if ( "META-INF/application.xml".equals( entry.getName() ) )
final XMLDocument modifiedApplicationXml = insertSecurityRoles( in );
final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
modifiedApplicationXml.print( byteOutput );
final int numBytes = byteOutput.size();
entry.setSize( numBytes );
if ( entry.getMethod() == ZipEntry.STORED )
entry.setCompressedSize( numBytes );
final CRC32 crc32 = new CRC32();
crc32.update( byteOutput.toByteArray() );
entry.setCrc( crc32.getValue() );
out.putNextEntry( entry );
byteOutput.writeTo( out );
else
// Copy all other zip entries as they are.
out.putNextEntry( entry );
copy( in, out );
in.close();
out.close();
private XMLDocument insertSecurityRoles( InputStream in ) throws IOException
final DOMParser domParser = new DOMParser();
domParser.setAttribute( DOMParser.STANDALONE, Boolean.TRUE );
try
domParser.parse( in );
final XMLDocument doc = domParser.getDocument();
final Element docElem = doc.getDocumentElement();
final Iterator iter = _securityRoles.iterator();
while ( iter.hasNext() )
final String desc = (String) iter.next(); // might be null
final String roleName = iter.next().toString(); // must not be null
final Element securityRoleElem = doc.createElement( "security-role" );
if ( desc != null )
securityRoleElem.appendChild( createPcdata( doc, "description", desc ) );
securityRoleElem.appendChild( createPcdata( doc, "role-name", roleName ) );
docElem.appendChild( securityRoleElem );
return doc;
catch ( SAXException e )
e.printStackTrace();
return null;
private Element createPcdata( XMLDocument doc, String elemName, String pcdata )
final Element elem = doc.createElement( elemName );
elem.appendChild( doc.createTextNode( pcdata ) );
return elem;
private final byte[] buffer = new byte[4096];
private void copy( InputStream in, OutputStream out ) throws IOException
while ( true )
final int bytesRead = in.read( buffer );
if ( bytesRead < 0 )
break;
out.write( buffer, 0, bytesRead );

Similar Messages

  • How Tou2026 Create Custom Application in E-Commerce 7.0?

    Hi all,
    We want to set up SAP E-Commerce for ERP 7.0. For SAP E-Commerce for ERP 5.0 the following configuration guide is available:
    How Tou2026 Create Custom Application in E-Commerce 5.0
    What about SAP E-Commerce for ERP 7.0? Is this guideline also valid for 7.0?
    If not, where can I find the corresponding configuration guideline for SAP E-Commerce for ERP 7.0 (on the SAP Service Marketplace?)?
    Thanks in advance.
    Regards,
    AV

    Hello Av,
    Please see the Development and extension guide @
    http://service.sap.com/crm-inst
    => Release 7.0
    => Operate
    Regards
    Mark

  • How to include custom taglib in javascript on a given jsp page

    Hi,
    How to include custom taglib in javascript on a given jsp page?
    i have a jsp page on which i am adding selectboxes using javascript.
    But now i have created my own custom select box and want to add it on a given jsp page.
    is the code to create the box box.
    <sample:pickListOptions employeeId="abcs123"/>
    but how should i embed it in javascript, so that i will be able to add it on the give jsp page.
    Thanks,
    Javaqueue

    when the jsp page is loaded for the first time it contains a select box containg names created by a taglib.but there is a feature i want to add wherein though javascript the name selectebox will keep on coming on each row i want to add. and this is row addition and deletion is being handled by the javascript. there i encounter the bug how to interact the javascript with taglib so tha with each row addition i will have populated taglib created select box on each row.
    Thanks,
    Javaqueue

  • How to protect custom applications using oracle access manager?

    Can someone brief me on how to protect custom applications using oracle access manager?

    Is the Custom application a Web Application running on certified platform? If its Web Application then its no different you have to configure the access policies with http(s) as resource type.
    If its not a web application you can write Custom access Gate and then implement. You would configure the policies similar to Web application (you can define your ouwn resource type if you like) and in the custom web gate you will use Access server SDK API to validate the access rules.
    Thanks
    Ram

  • How to Including custom text in the step "User Decision"

    Hi All
    Please help me in this regards I got problem
    How to Including custom text in the step "User Decision"
    Regards
    Poonam
    Edited by: Julius Bussche on Feb 2, 2009 1:59 PM
    Please use the corect forum, meaningfull subject titles and use the search before asking questions

    Hi Poonam,
    If I understood your problem correctly...
    When you create a user decision a screen will appear.
    In the decision tab under Title you can give your custom text.
    Even if you want to give some variable (value of which will be determined at runtime) you can give that as well.
    Like you have created a container for BOR objects MAT_DETAIL, in that object there is a field MATERIAL.
    You can define your custom text as below:
    Title: Would you like to create new material or display material &
    Parameter 1:  &MAT_DETAIL.MATERIAL&;
    In Title you can give as max. as 4 &(ampersand). And each & will be replaced by each Parameter at runtime in same sequence.
    In parameters you use to select the container defined by you earlier.
    Hope this will help.

  • In LSMW how to include customer fields in BAPI method ?

    Hi all,
    We have a requirement to use BAPI method in LSMW. We have some custom fields defined needs to be handled in BAPI structures.Please tell me how to handle BAPI extension structures(EXTENSIONIN/OUT) in LSMW.

    Hi Venugopal,
    You can use the sold to party field fiield for your requirement.
    Press f4, you will get a pop up to select customer depending on various selection criteria including customer name.
    If can enter the customer name, which will sort out the sold to party number whihc you can use.
    If this is not wat is required you have to copy the transaction and create a new Zreport.
    Hope this helps you.
    Thanks
    Arun

  • How to store custom application data in the Portal

    Hello,
    Is there a mechanism in the Portal whereby you can put custom application data into persistence and then retrieve it again? I don't want to use the database to store the data. I was hoping there is some API to such a mechanism that will allow you to do this.
    Of course, I also mean that I want to persist the data beyond the lifetime of a session - i.e. when the user logs off and comes back later, I want to retrieve the data again. Also, I do not want to use a KM repository, because I do not want to make the application KM-dependent.
    Any suggestions would be welcome.
    Thanks,
    Martin
    Message was edited by: Martin Ceronio

    Martin,
    do you want to store this data on a per-user basis? Then the personalization functionality might be want you want. You could define some additional properties in the portalapp.xml for your component and set its personalization to "no-dialog".
    Alternatively, you could store this information as additional attributes of the IUser object. See the following code snippet for details:
    IUserMaint mutableUser = UMFactory.getUserFactory().getMutableUser(userName);
    mutableUser.setAttribute(NAMESPACE, ATTRIBUTE, "some user-specific data");
    mutableUser.save();
    (NAMESPACE, ATTRIBUTE being some custom defined String constants that uniquely identify the attribute.
    Repost if you need further details.
    Regards,
    Dominik

  • How to migrate custom application from AK to MDS ?

    I have got a custom application in Apps 11.5.8 where the data is stored in the AK_REGIONS table, etc. and the custmo application is registered in FND_APPLICATION table correctly. When applying the OAF 5.7 patch, the data is not migrated to MDS.
    Answer:
    This is because the OAF 5.7 patch does not migrate product data automatically. It is up to the development teams to do this.
    With Custom applications, there is apparently no documented or supported mechanism to migrate this data from AK to MDS.
    Solution:
    OA Framework 5.7 (or OAF 5.10) can read the page definitions out of AK, so there is no pressing need to migrate the page definitions anyway. (See Metalink Note 216823.1 for example of this) When a page needs to be changed, the page will need to be changed via AK Developer as before, or manually recreated using JDeveloper which will then be using the MDS repository.

    Do you mind telling me how you do it from the client ? All the libraries for the import utilities seem to be present in the application server. How (and what) to bring to the client where my jdeveloper resides ?
    Thanks in advance...

  • How to include custom css in js file

    Hi,
    We have a JS view and we want to include custom css in the same. How can we achieve the same.

    Hi Saket,
    You can use this in your view
    jQuery.sap.includeStyleSheet("custom.css","MyCustomCSS");
    or if it is in a package called css
    jQuery.sap.includeStyleSheet("css/custom.css","MyCustomCSS");
    MyCustomCSS is just an alias to call the css file
    Thanks,
    Roshini

  • How to include custom modules in eclipse

    Hi,
       We have ATG 10.1.2 knowledge and self service module with some project specific custom module on Production UNIX machine.
    I have installed ATG 10.1.2 on local machine(Windows 7 64 bit) for development purpose.
    1> If I copy custom module from the unix machine and paste it in my local windows machine and generate EAR, will it work?
    2> How to include the custom module in eclipse for development activity.
    I am new to ATG. Any help is much appreciated.
    Thanks.

    when the jsp page is loaded for the first time it contains a select box containg names created by a taglib.but there is a feature i want to add wherein though javascript the name selectebox will keep on coming on each row i want to add. and this is row addition and deletion is being handled by the javascript. there i encounter the bug how to interact the javascript with taglib so tha with each row addition i will have populated taglib created select box on each row.
    Thanks,
    Javaqueue

  • How to include Customer Name in VA15N

    Hi All,
            The standard report VA15N does'nt include customer name.User wants the customer name aslo to be included in the report.Kindly suggest how to include the customer name in the standard report or any other alternative.
    Regards,
    Venugopal

    Hi Venugopal,
    You can use the sold to party field fiield for your requirement.
    Press f4, you will get a pop up to select customer depending on various selection criteria including customer name.
    If can enter the customer name, which will sort out the sold to party number whihc you can use.
    If this is not wat is required you have to copy the transaction and create a new Zreport.
    Hope this helps you.
    Thanks
    Arun

  • How to use custom pipeline dlls in Biztalk Projects so that they appear in the send/receive pipeline configuration after deployment?

    I have a existing Biztalk application that uses custom pipelines for receiving excel files. I have the dll of that custom pipeline. Now i created another BT application that needs to use that same custom pipeline. But after i deploy the application in
    Biztalk, i can't see the  pipeline available in Receive pipeline configuration combo box during configuration. I have referenced the custom pipeline dll in my project before deploying, but that doesn't help. I also copied the dll in the C:\Program Files
    (x86)\Microsoft BizTalk Server 2010\Pipeline Components folder and C:\Program Files (x86)\Microsoft BizTalk Server 2010 folder, but that doesn't make the pipelines appear during configuration too.
    Can anyone give any idea on how can i use these custom pipeline dlls in project so that they appear in configuration after deployment?

    If you plan on using the deployed pipeline across multiple applications in BizTalk, the BizTalk Application (using the BizTalk Server Administration Console) should have the other application [where the pipeline is deployed] as reference.
    For e.g.: Custom Pipeline (myCustomPipeline) part of a BizTalk Project (dll - myCustomProject.dll) deployed under Application [Some Application] also to be used in another BizTalk Application [Some Other Applicaiton] then using BizTalk Server Administartor
    right click the "Some Other Application" and select "Properties"
    on the "Properties" page, left hand side, select "References"
    on the right-hand side, use "Add" to add the "Some Project" as a reference.
    Doing so will ensure that ALL resources (maps, schemas, orchestrations, send ports, receive locations, rules, etc.) deployed for "Some Application" are available/referensible in "Some Other Application".
    Regards.

  • How to include custom style sheets in BI 7 WAD (Web Reports)

    Hi,
    I have WAD in 3.X, where I have used custom stylesheets. Now I need to use the same style sheets of 3.x development in BI 7 WAD.
    How do i achieve this?
    Regs, Arka

    Hi,
    Stylesheets cannot be included via the Web Application Designer for BI 7.0 web templates. You need to use the Theme Editor of the Portal instead. Please refer to the documentation:   
    http://help.sap.com/saphelp_nw70/helpdata/de/f4/bb7a3b688d3c1de10000000a11402f/frameset.htm
    Best regards,
    Janine

  • How to include HTML in XML for OMNIPORTLET

    I have an OMNIPORTLET where I need to display a list of names along with a link to a story if they have a story.
    The goal is to list that NAME and if they have a story then show a (STORY) with a link under the STORY, and then for those names that do not have stories nothing would show for the second column.
    example below:
    ACME Rockets
    ACME Skis ( [Success Story|http://www.oracle.com])
    ACME Sleds
    The feed works correctly in displaying the names, but I need some guidance on how to handle displaying the Story link.
    In the XML file I have a tag for REFERENCE_URL and then within that tag is the &lt;a href="..."&gt; coding using *&lgt;* type escape characters to insure the HTML comes across embedded in the case where there is a Reference story. Also, when there is not a story, then the tag is left blank.
    The file looks fine when I check it out, but then when I include it in the OMNIPORTLET and run the Test button on the first page of the portlet configuration, all of the ampersands in front of the less than and greater than escape characters show that they are turned into having an extra ampersand in front of them.
    In the OMNIPORTLET I am using:
    * an HTML View
    * in the Layout in the Repeating Section with in the table column I display the ##COMPANY_NAME## and then the ##REFERENCE_URL## expecting to have the Reference URL push out a live HTML anchor and link.
    What happens is that I get a text display of the anchor instead of it coming out in HTML code to actually be an anchor.
    i.e.: ACME Systems &lt;a href="http://www.oracle.com/examplelink.pdf" target="_blank"&gt;Success Story&lt;/a&gt;
    Any guidance on what I should change or another method to handle what I am needing to do?
    Thanks,
    Stephen
    Edited by: slsmith on Feb 5, 2010 2:27 PM

    The define the "should not alter part" as CDATA?
    http://www.w3schools.com/XML/xml_cdata.asp

  • How to create Custom Application .plist file

    Hi all,
    I want to create a custom myapp.plist file from where my application can read or write information.
    I used the java.util.prefs.Preferences class for that it works fine.
    but the problems are
    (a) I want file name myapp.plist instead of
    com.apple.java.util.prefs.plist
    (b) only 2-3 levels of nodes are created .
    If anybody has an idea please let me know
    thanks

    Hi Lukas,
    You can use Mass device setup (MDS) for the same.
    Setup Package Or Software Package should serve your purpose.
    Setup package: You can packeg Server/connection detailsApplicationDevice details.
    Software package: Server/connection Details+Application.
    Please refer to the documentation for creating MDS.
    You can also refer to below links
    How to Rollout Device Using Setup Package - http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e03d3384-7a43-2b10-5698-c2584ce88c26
    How to Rollout Device Using Software Package - http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40db9161-7d43-2b10-b699-bba304dacccd
    Regards
    Rohith
    Edited by: Rohith Deraje on Apr 7, 2011 2:08 PM

Maybe you are looking for

  • Current Date in Transfer Rules Formula Editor

    Hi! Anyone aware how to get todays' date in the Transfer Rules Formula Editor? Aim is to calculate ones actual age based on a given birthday-month-year using the dateDifference function. Cheers

  • Mac loses wi-fi connection after sleep

    Since I upgraded to Mountain Lion, every time I wake my Macbook from sleep, I have to manually reconnect with my wi-fi router, and sometimes it takes upwards of a minute before Airport even senses the various routers within range, includng mine. Befo

  • Issues syncing movies/video

    I thought there was an option to convert movies/videos in itunes? I did it before. I see the videos in my library but what is the blue dot next to the file name?

  • Need to Upgrade Monitor - Photographer Worthy - Pocketbook Friendly - Recommend

    Hi have an HPE H8-1242 quad core i7. I need to replace the monitor HP sent with the machine.  Im a photographer and ive noticed that this monitro changes color and brightness if I move off dead center viewing.  If I tilt the monitor back just a bit..

  • Live cache was down

    Hi All, The live cache instance on my SCM was down yesterday. However it was got up again thro' LC10.I'm trying to find the reason for it being down. Can someone please suggest how can I get this information. I can see the following in knldig around