Documents from UCM not opening in some browsers

Hi ,
I am using the RIDC GET_FILE service to display the pdf in the WebCenter portal page. When the method is called the pdf document opens in Chrome browser in some machines but not in Firefox or other browsers. The file is returned as "application/octet-stream" and hence does not open as a pdf document.
Following is the java code written to fetch the files
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.adf.share.ADFContext;
import oracle.javatools.resourcebundle.BundleFactory;
import oracle.security.xmlsec.samlp.ResponseType;
import oracle.stellent.ridc.IdcClient;
import oracle.stellent.ridc.IdcClientManager;
import oracle.stellent.ridc.IdcClientException;
import oracle.stellent.ridc.IdcClientManager;
import oracle.stellent.ridc.IdcContext;
import oracle.stellent.ridc.convenience.usersecurity.CacheId;
import oracle.stellent.ridc.convenience.usersecurity.IUserSecurityCache;
import oracle.stellent.ridc.convenience.usersecurity.impl.UserSGAcctAclCache;
import oracle.stellent.ridc.convenience.usersecurity.impl.UserSecurityGroupsCache;
import oracle.stellent.ridc.model.DataBinder;
import oracle.stellent.ridc.model.DataObject;
import oracle.stellent.ridc.model.DataResultSet;
import oracle.stellent.ridc.protocol.ServiceResponse;
import utils.system;
    public class getFile extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=UTF-8";
        private static final long serialVersionUID = 1L;
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        String cid ;
    public  void doGet( HttpServletRequest request,
                        HttpServletResponse response) throws  ServletException ,IOException {
                   try {
                       cid = request.getParameter("cid");
                   } catch (Exception e) {
                       e.printStackTrace();
        try{
            IdcClientManager manager = new IdcClientManager();
            IdcClient idcClient = manager.createClient("idc://oa8054.us.oracle.com:7444");
            IdcContext userContext = new IdcContext("SADMIN", "SADMIN1");
                    System.out.println("got idc client");
                // populate the binder with the parameters
                    DataBinder dataBinder = idcClient.createBinder();
                    dataBinder.putLocal("IdcService", "GET_FILE");
                    dataBinder.putLocal("dDocName",cid);
                    dataBinder.putLocal("RevisionSelectionMethod","Latest");
                    dataBinder.putLocal("Rendition","Web");  
                 dataBinder.putLocal("allowInterrupt","1");
                    ServiceResponse response1 = idcClient.sendRequest (userContext, dataBinder);
                response1 = idcClient.sendRequest (userContext, dataBinder);
                     InputStream content = response1.getResponseStream() ;  
                    BufferedOutputStream  output = new BufferedOutputStream(response.getOutputStream(), 1024);             
                    byte[] buffer = new byte[1024]; 
                    int length;
                    while ((length = content.read(buffer)) > 0){ 
                    output.write(buffer, 0, length); 
            content.close(); 
            output.flush();
                    output.close();
                catch (IdcClientException e) {
                             e.printStackTrace();
And the call to the servlet is  made on click of a link.
Why doesn't the documents() open in some browsers while it does in some.Similarly i want to open docx and rtf files from UCM also using the same code without downloading.
Please help.
Thanks

Hi.
Try following sample code:
Include cmfn tag library in your page
xmlns:cmfn="http://xmlns.oracle.com/webcenter/content/functions"
Use next EL Expression to get a Node url's (are the same methods as a Node in CP):
#{cmfn:getNodeById(yourdDocName).url.downloadUrl
#{cmfn:getNodeById(yourdDocName).url.renderUrl
Sample:
<af:goLink targetFrame="_blank" destination="#{cmfn:getNodeById('UCM676546').url.downloadUrl}"/>
You'll need connection to UCM configured in your WebCenter Portal Application because it will ask for the current IDC connection configured.
Regards.

Similar Messages

  • Retrieving documents from UCM

    Hi
    I have created a webcenter portal application that retrieves contents from UCM using the RIDC api. Currently any ucm user is able to access any document from UCM. I want the application to work such that a particular user say 'x' is able to access only a set of documents and another user say 'y' is not able to access those documents.
    This is my java code:
    try{
    IdcClientManager manager = new IdcClientManager();
    IdcClient idcClient = manager.createClient("idc://aisdell59.oracle.com:4444");
    IdcContext userContext = new IdcContext ("temp_user");
    // populate the binder with the parameters
    DataBinder dataBinder = idcClient.createBinder();
    dataBinder.putLocal("IdcService", "GET_FILE");
    dataBinder.putLocal("dDocName",dDocName);
    dataBinder.putLocal("RevisionSelectionMethod","LatestReleased");
    dataBinder.putLocal("Rendition","Web");
    ServiceResponse response1 = idcClient.sendRequest (userContext, dataBinder);
    InputStream content= response1.getResponseStream() ;
    How can i achieve this security?
    Thanks and Regards

    First of all, is there a specific reason why you are building your own component and not using the content presenter or other OOTB taskflows? These taskflows automaticly propagate the security to UCM.
    If you really want your own component than you should replace following line:
    IdcContext userContext = new IdcContext ("temp_user"); With:
    String user =  ADFContext.getCurrent().getSecurityContext().getUserName();
    IdcContext userContext = new IdcContext (user); This way the current logged in user will be propagated to the IdcContext and thus it will only return the document that are accessible by the user.

  • Help please I can not openening because: Error opening the document,  Acrobat can not open the file while printing another document

    Help, I ca not opening the file, beacause the mac says Error opening the document, Acrobat can not open the while printing another document

    Thank you very much for your replies Taggert_77 & swmtgoet_x :D
    Taggert77_: I have never used NetBeans. I only installed it in the bundle as I had read on another post that somehow installing the bundle magically helped another user with the same problem (he didn't know why it worked after that either).
    Before XP SP3 I was able to execute .jar file through cmd prompt. Now I am not.
    This file is executable, grab it and you will see. Here is a screen shot (program in front is FlashFXP, behind is the cmd prompt and what should happen):http://www.freeimagehosting.net/uploads/53273b4ddf.jpg
    swmtgoetx_: I only did the other cmd's to try to make it spit out something, anything lol :D
    The proper cmd is simply: java -jar soht-client-0.6.2.jar
    I did give your cmd a try, and it produced nothing :( (just like the other correct cmds)
    java -client -jar soht-client-0.6.2.jar soht.properties
    Thank you again...the mystery remains
    PS. If you do a search for this you'll find an amazing amount of XP SP3 users with the same problem and no solution posted that I could find except one chap that did the unistall install order that I did above).

  • Whenever I double click on any htm or html document it will not open with firefox it gives a message window saying "Windows can not file path please type correctly" (not extact these words)

    I installed new version 4. Whenever I double click on any htm or html document it will not open with firefox it gives a message window saying "Windows can not file path please type correctly" (not extact these words) .. It was working when old firefox was there..

    Phillipp,
    I tried it again using "save link as", and this time it actually worked! I just now downloaded several more using the "save link as" option, and it works perfectly. Thanks. Problem solved.
    Littleberry

  • How can I install plugins? my files are not opening because some are missing after updating my OS

    How can I install plugins? my files are not opening because some are missing after updating my OS
    I can´t update the software because it crashes
    Thanks

    Casiii which Adobe software or service is your inquiry in reference too?

  • How to migrate documents from Lotus Notes to Stellent Repository

    Hi All,
    I want to migrate almost 5000 documents from Lotus Notes to Stellent Repository. Is there any way to achieve this functionality?
    how to integrate both the things please let me know.
    Regards,
    Vishal Shah

    Hey Vishal,
    one approach could be
    1) fetch all the documnets and metadata (wat ever you need) from the Lotus Notes repository using java+Lotus API 2) write a BatchLoad script file using the metadata you have. And then start the batch loader.
    other approach could be to
    1) fetch all the documnets and metadata (wat ever you need) from the Lotus Notes repository using java+Lotus API
    2) Checkthem in using the WSDLs.
    There is one thing thought that even i would like to know its which of the two will perform better ?
    regards,
    sapan

  • Muse site not visible on some browsers

    I have created a MUSE website for one pf my clients and they tell me it is not visible on some browsers but did not specify on which it did not show.
    Any suggestions?
    Thanks

    I have asked but had no response yet. My research tells me that the probable issue is with IE9 and older that aren't compatible with HTML5 or CSS3. Is that right? if so it is a Microsoft issue and people using old incompatible browsers.
    What do you think? The site works just fine on Firefox, Safari and Chrome.

  • IWeb hypertext links to pages from my site not "viewable" in some browsers

    I am new to iWeb 08. iWeb created hypertext links to eleven pages from my "top level" site are not "clickable" or viewable in some browsers yet the hyperlinks I added on top page to other sites don't present a problem.
    No problem with Safari or AOL Desktop Version 1.2 or Firefox browsers. However, AOL Ver 10.3.7 (rev 4136.310) only shows other site links and NOT the page links at the top of site page. Only a dot is visible where links to other pages in the site. I thought it could have been a Java Scripts problem so I updated my AOL to latest JAVA. Not concerned for my part but others with Mac AOL may have same problem.
    Is there something I could do diferent at my site or is this another AOL shortcoming?
    See: http://web.mac.com/louiedea/OceanaMed_Cruise_2008/MedCruise08.html
    Thanks, LouieDeA

    Gayle,
    No solution yet. I am sure it is a shortcoming of AOL's Mac browser but am trying to contact AOL support (difficult now that they are free). I don't use their browser but there are probably those that do. I presume you don't have that problem when you use Safari, etc?
    Louie

  • File exported as ePub from inDesign not opening in Stanza, known bug?

    Hello,
    I've just started to learn how to export documents to EPUB format using inDesign CS5 7.0.3 on Mac OSX. I've found that the exported books can be opened in Adobe Digital Editions, but not on Stanza.
    The error I am getting in Stanza is:
    Could not load book
    Could not find required entry in archive: OEBPS/\Q7%20laws.xthml\E Available entries are: [META-INF/container.xml ...
    After a lot of trial and error I came to find out that apparently, the error was generated by the original .indd file name: When the inDesign original filename is "7 laws.indd" Stanza will not open the file.
    However, if I remove the spaces from the filename (changing to "7laws.indd") it opens with no problem.
    If this case turns to be true for all user of the latest version of inDesign, I believe that the EPUB exporter should:
    a) Convert the spaces in the filename to dashes (or something akin)
    b) At least warn that the file name with spaces can cause trouble on some readers.
    I wonder if the inDesign dev team, is aware of this and/or if this issue also affects Windows users.
    If so, could it be fixed on an upcoming patch?
    - Alan Q

    Try this tutorial:
    http://tv.adobe.com/watch/csinsider-design/indesign-creating-interactive-pdfs-with-page-tu rn-and-flash-animations/

  • Background nav image not displaying in some browsers...

    Hi,
       I'm in the process of building a website template - still ironing out some bugs, but just discovered that the bacground image in my navigation bar isn't displaying on some browsers (including some versions of IE). It works in IE8 where my primary testing takes place (on both my local drive and from the temporary "live" server, but in most other browsers, doesn't show up...
    below is a link to my test page:
    http://home.roadrunner.com/~jgigandet/trinity/
    and here is the css with the applicable code in red:
    /*Menu Outer Wrapper*/
    .p7PMMh04 {
    width: auto;
    height: 20px;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: bold;
    background-image: url(img/new_bk.gif);
    background-repeat: repeat-x;
    background-color: #000;
    text-align: left;
    line-height: normal;
    /*Hide Sub-Menu in Design View
    Compensate for LI padding on Sliding Doors themes*/
    .p7PMMh04 ul div {
    display: none;
    TOP LEVEL MENU
    .p7PMMh04 ul {
    margin: 0;
    padding: 0;
    .p7PMMh04 li {
    list-style-type: none;
    float: left;
    width: 120px;
    /* Hide from IE5 Mac \*/
    .p7PMMh04 li {
    width: auto;
    /*Top Level Links*/
    .p7PMMh04 a {
    display: block;
    text-decoration: none;
    padding: 2px 14px 3px 14px !important;
    color: #ffc42a !important;
    /*border-right: 1px solid #8184e6;  */
    text-align: left;
    /*Link hover when no drop down is present */
    .p7PMMh04 a:hover {
    color: #df8f04 !important;
    /*background-color: #DFDFDF;*/
    Syntax for special classes programatically assigned to first and last links and also LIs
    See user guide for more information
    .p7PMMh04 ul a.pmmfirst {
    border-left: 1px solid #df8f04;
    .p7PMMh04 ul ul a.pmmfirst {
    border-left: 0;
    .p7PMMh04 ul a.pmmlast {
    .p7PMMh04 ul li.pmmfirst {
    .p7PMMh04 ul li.pmmlast {
    /*First Sub Level*/
    .p7PMMh04 ul ul {
    z-index: 10000;
    background-color: #333;
    width: 150px;
    background-image: url(img/pmm_carbon_subs.jpg);
    background-repeat: repeat-x;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    .p7PMMh04 ul ul li {
    float: none;
    background-color: #000;
    background-image: none;
    .p7PMMh04 ul ul a {
    padding: 4px 12px !important;
    color: #ffc42a !important;
    border-right: 0;
    text-align: left;
    overflow: hidden;
    /* rollover on 1st level rollovers  */
    .p7PMMh04 ul ul a:hover {
    background-color: #333; !important; 
    color: #df8f04 !important;
    /*Third Level (Flyouts in horizontal menu)*/
    .p7PMMh04 ul ul ul {
    border-top: 1px solid #df8f04;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    border-left: 1px solid #df8f04;
    SPECIAL IMAGE-BASED RULES
    .p7PMMh04 img {
    border: 0;
    .p7PMMh04 .p7PMM_img {
    padding: 0px;
    border: 0;
    background-image: none;
    background-color: transparent;
    TRIGGERS and CUURENT MARK RULES
    The Closed state relates to trigger items when their child menus are not showing
    The Open state relates to trigger items when their child menus are showing
    Selectors appended with _left Automatically change arrow position and orientation
    if sub levels are set to fly out to the left
    /*Sub Level*/
    .p7PMMh04 ul a.trig_closed, .p7PMMh04 ul a.trig_closed_left {
    background-image: url(img/pmm_south_medium.png);
    background-repeat: no-repeat;
    background-position: right center;
    .p7PMMh04 ul a.trig_closed_up {
    background-image: url(img/pmm_north_medium.gif);
    background-repeat: no-repeat;
    background-position: right center;
    .p7PMMh04 ul a.trig_open, .p7PMMh04 ul a.trig_open_up {
    color: #000 !important;
    background-color: #DFDFDF !important;   /* This is background color of main dropdown rollover */
    .p7PMMh04 ul ul a.trig_closed {
    background-image: url(img/pmm_east_dark.png);
    background-repeat: no-repeat;
    background-position: right center;
    .p7PMMh04 ul ul a.trig_closed_left {
    background-image: url(img/pmm_west_dark.gif);
    background-repeat: no-repeat;
    background-position: left center;
    .p7PMMh04 ul ul a.trig_open {
    color: #FFF !important;
    background-color: #424242 !important;
    /*The Current Marker (You are here) links*/
    .p7PMMh04 .current_mark {
    font-weight: bold;
    color: #60c3d1 !important;
    .p7PMMh04 ul ul .current_mark {
    color: #FFF !important;
    Utility Rule used for Clearing floats in Horizontal Menus
    .p7pmmclearfloat {
    clear: both;
    height: 0;
    line-height: 0;
    font-size: 0;
    Thanks in advance for any advice,
    Jesse

    You have applied a height of "auto"to your menubar container, which gives it no height at all in some browsers. If you have a clue what height you would like to display for your menubar, give it, instead of:
        <div style="height: auto;" id="p7PMM_1" class="p7PMMh04">
    Better yet, leave it in the CSS file, where you will find it when you go looking for it. You already assign a height there:
    .p7PMMh04 {
        width: auto;
        height: 20px;
        margin: 0 auto;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        font-weight: bold;
        background-image: url(http://home.roadrunner.com/~jgigandet/trinity/img/new_bk.gif);
        background-repeat: repeat-x;
        background-color: #000;
        text-align: left;
        line-height: normal;
    Because your inline style of height:auto; has more proximity (is closer) to the element being styled, it overrides the style in the stylesheet and applies the height: auto; instead of allowing the height: 20px;
    Beth

  • Iwork documents in iCloud not opening on iPad nor on Mac after stopping syncing

    When I upgraded to IOS5 I activated icloud support for iwork documents. After some problems I switched off syncing to icloud answering please keep my documents on iPad.
    Now I have the following situation for all older documents
    On iPad the Documents are just an icon (pages for example) or are shown as a preview but in neither case they load. There is a rotating "please wait" but it never succeeds or just stops without opening any document.
    On Mac a similar situation with slightly different appearance. Sometimes it says just
    * Document not available, try later, sometimes
    * Open your document on iDevice before opening in Mac
    So I am locked. The document appear on the iCloud-Website seen from my Mac but do not open. Neither do they open on my iPad. They are shown as icon previews (in most cases) but cannot be opened or sent by email etc.
    Where are they? Are they anywhere? Can I get them by some magic other methods??
    TIA for answers.

    Disregard.  It apparently took about 15 minutes for the sync to occur and now I'm seeing my iCloud documents on my iPad.

  • Reading a document from application server / opening in SAP session

    Hi guys,
    we  have a requirment has follows , please help me with your inputs.
    We have list of documents available in the DMS server....(XLS,DOC,PDF)
    1. How to get the list of file names ( available in the DMS server )  into the internal table.
    2. i need to open these documents by clicking - into the same sap session itself. (it should not open in windows)
    Please Note : Many of our forum friends earlier to open the file in windows.
    regards
    Giri

    Hi,
        You can show any  doc that is uploaded in DMS using the URL of the doc . the doc will be shown in a container. You can refer the std prog . SAPRDEMOPIVOTINTERFACE.. or some thg like that ( i dont remember the exact name ) .
    You need to pass the Class name . object type and object name to  find the URL.  Check transaction OAER and enter class as SSOFFICEINTEGRATION ,  type as OT and name as SSOFFICEINTEGRATION.
    Hope this helps.

  • Need help with PAGES in the document file will not open

    Hi if anyone can help me I woud appreciate it-
    I downlaoded awhile back the new software X and eveything was fine till I tried to open some documents (pages) and it will NOT OPEN a window pops up a newer version is available but when I go in there are NO UPDATES and I really do not think I need to buy a newer version do I?
    Please Help

    When you installed the latest version of Pages (and other iWork apps), the older versions were saved in a folder named "iWorks '09" in the Applications folder. You're trying to open a document that was saved in Pages 5 or in Pages for iOS using the older version of Pages. What you probably need to do is remove the Dock icon and drag Pages 5 into the Dock.

  • Codes to open Video or Documents from Library to open in new tab by default

    Hi 
    I am using Sharepoint 2013 Office 365 web version to build and edit the TeamSite. 
    Is there a way using SharePoint Designer or Scripts to Open the Video or Documents from the Document/Asset Library to open them in new tab or window when clicked? 
    Currently, When clicking on video it opens in the same IE window, I could change the Thumbnails view to All asset view then right click and open it in a new windows. But I want this to happen by default when clicking the link
    I would appreciate your view in detail. 
    Regards, 
    Daniel 

    Hi,
    If you just want to open the video or document in a new tab, yes, it can be achieved with JavaScript or JSLink.
    However, it is not a recommended behavior to add script for such a functionality into a page cause it is more like an option of browser behavior and it would
    make the pages in a site difficult in maintenance.
    The easiest way I think, you can perform a “Middle click” or “Ctrl + Left click” to open the video or document in a new tab.
    To achieve it using JavaScript, we will have to modify all the “onclick” properties of the items in a library after the page loaded which should be an extra burden of your
    browser.
    Here is a link with script demo about how to open a link in new tab for your reference:
    http://junestime.wordpress.com/2013/02/26/javascript-open-links-in-new-windowtab-in-sharepoint-2010/
    Feel free to reply if there are any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • All my pdf documents have turned into firefox html documents and will not open correctly

    All my pdf documents have suddenly become firefox html docs & will not open unless I go into the folder, right click, 'open with', etc. I haven't changed any of my settings. I think firefox did an update yesterday, however, so I'm connecting it with that, possibly...

    Try this:
    # Right click your PDFs, click Properties
    # Go to the General tab
    # In the '''Opens with''' section, click the ''Change'' button
    # Select Adobe Reader (or Foxit Reader/Whatever PDF viewer you use)
    # Click Apply then OK.
    Does it work then?

Maybe you are looking for