Download Document of Intranet Portal with adf 11g connection credentials

Hello


JDev Version: 11.1.2.2.0

I am trying to download a document of intranet portal that uses my IDs of NT.

When I try to download the link from the browser, it works, but try even when download of java code with ADF Backing Bean his fault download saying 401: unauthorized Exception.

Question here is how to move the Windows NT credentials to my grain of document download or is there a way to say "use my login credentials of the system"?


I copy the source code here for your reference.

/**
* Download the file stored in the database in the URL format
@param facesContext
@param outputStream
*/
' Public Sub downloadDocument (FacesContext facesContext, OutputStream, outputStream)
{
OperationBinding op = (OperationBinding) findOperation ("getDocumentLocation");
Map opParamsMap = op.getParamsMap ();
opParamsMap.put ("docRowKey", docValueID.getValue ());
String result = (String) op.execute ();.
System.out.println ("location of the document" + result);
FileOperations.getInstance (f:System.NET.WebRequestMethods.FTP.DownloadFile (result));
}


synchronized Public Shared Sub downloadFile (String strURL)
{
DocumentURL URL;
UConn URLConnection = null;

try {}
documentURL = new URL (strURL);
uConn = documentURL.openConnection ();


Authenticator.setDefault (new Authenticator() {}
protected PasswordAuthentication getPasswordAuthentication() {}
return new PasswordAuthentication ("xxxx", "xxxxx".toCharArray ());
// }
// });

int byteRead;
int byteWritten = - 1;

InputStream is = uConn.getInputStream ();
OutputStream outStream = null;
Byte [] buf = new byte [153600];
While ((byteRead = is.read (buf))! = - 1) {}
outStream.write (buf, 0, byteRead);
byteWritten += byteRead;
}
System.out.println ("uploaded successfully.");
}
catch (FileNotFoundException fnfe)
{
System.out.println ("Exception occurred while downloading file:" + fnfe.getMessage ());
}
catch (MalformedURLException e)
{
e.printStackTrace ();
}
catch (IOException e)
{
e.printStackTrace ();
}
Finally
{

}
}


Please note that I am the download document based on a URL (intranet portal).

Happy to provide any other information.

Appreciate the quick response

Thank you inadvance

Network and application user id user ID but can match... the password is not... Since you say that the URL itself works very well when you give him on browser, try opening the URL using goLink.
Guess it would work if the user of the network has access to the portal.

Check out the link below to open the URL using goLink.

Open a dynamic URL to link to the Table column

Good luck!

Edited by: 119413 January 10, 2013 14:35

Tags: Java

Similar Questions

  • Download Document Editor B2B

    Hello

    I'm trying to understand from where I can download B2B Document compatible with version 11g SOA Editor. Can someone share the link?

    Kind regards

    Hello

    You need to download using Oracle delivery: https://edelivery.oracle.com/

    Choose a package of product: Oracle Fusion Middleware

    Platform: select your desired platform

    Then choose:

    Oracle Fusion Middleware 11g Media Pack

    And finally:

    Publisher of B2B v11.1.1.6.0 documents

    See you soon

    Tiago

  • NSX API: Download ESG SSL VPN Portal logo

    I currently use the NSX API to supply an edge on our device of NSX Manager.  I was able to do everything with the exception of downloading a custom portal logo, I have included the information from the documents below, but it does not contain what the body of the request should look like.  I feel with this information, I would be able to complete the request.  Someone had to work with it before, or anyone is VMware be able to answer this question?

    Would also be nice to see the updated documentation with how to upload files to the REST API a bit more in detail...

    Configure Portal layouts

    You can configure the web page related to the SSL VPN client layout.

    Download Logo Portal

    Download the logo of Portal from the given local path.

    Example 8-150. Download logo Portal

    Request: POST https:///API/4.0/edges//sslvpn/config/layout/images/portallogo/

    Download the Phat banner

    Download the banner of the given local path phat client. Phat banner image should in bmp format.

    Example 8-151. Download the banner phat request: POST https:///api/4.0/edges//sslvpn/config/layout/images/phatbanner

    I have tried different methods... including base64 encoded image as a body and mulipart of form data but all fail with the error below.

    HTTP status 400-


    type of Status report

    Message

    Description The request sent by the client is syntactically incorrect.

    Sorry for the delay on this one there... replace layoutFile by banner.

  • RelayState parameter is a full support with ADFS in Windows Server 2012?

    We implement Single Sign-On with ADFS. (Service Provider - salesforce.com, identity provider - ADFS). But when authenticate us with ADFS, he is will authenticate successfully, but it will be redirected to the site complete salesforce instead of the mobile site. Salesforce document mentioned that we must manage the on ADFS RelayState parameter. And I saw that some article mentioned the 'RelayState' parameter is not fully supported for Windows Server 2012. Please let us know Windows Server 2012 is fully supports for the parameter "RelayState" and if it is how to handle on ADFS. Thank you.

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Integrate oracle 12 c with ADF forms

    Hi all

    How to integrate forms oracle 12 c with ADF faces with examples and code samples.

    For the 12 c forms which ADF version works.

    Hello

    Please see the link below. You need to try this... If all the subject, questions, please answer.

    https://www.YouTube.com/watch?v=FF62gqPfLNE

    http://www.Oracle.com/technetwork/developer-tools/jdev/redeveloping-forms-in-ADF-11g-1-133095.PDF

    Thank you

    Amey

  • override the default setting for Word download documents or opening

    I installed Office 2007 on my new computer Windows 8. I think I inadvertently clicked to open documents Word with Office 2013. Now, each Word document that I download (e-mail, for example) cannot be opened in Word 2007. I get a message that I'm trying to open a document in Office 2013 and I don't have it.

    How can I change these documents so Word will be downloaded and accessible with Word 2007? Fortunately, I have not managed to ruin my ability to open Excel documents.

    Hello

    If you right-click on the document and select 'Open with', you will be able to select 'Word' in the drop-down list and set it as the default...

    According to the exact file type, you may also be able to select "WordPad", which may be faster or easier to use.

  • Recipient able to download documents?

    If my company is interested in this service to new customers who register with us to rationalize. However, they sometimes need to provide us with certain documents upon registration. Is there a way to let the recipients to download a document and send it with electronic signature?

    In addition, I want to integrate the model into a Web page, can someone direct me to the right information on how to do it?

    Thank you

    Hello Joe,

    For the first scenario, you can use the file attachment field by making it slide in the preview page and then send for signature.

    Second workflow, if you are looking to integrate the document in a Web site, you can use the Widget feature and can retrieve the JavaScript Code into the Web site. Here's the reference documentation:

    Create Widgets | Services Adobe eSign

    Kind regards

    -Usman

  • How to make a downloaded document searchable for the search engines?

    How can I give a name, description, tags, to a downloaded document?

    For example, I have this link below, how can I give a description to it as if it were a web page?

    http://www.TU.biz/assets/Hi-torque-low-speed-hydraulic-motors.PDF

    I would like to do something more, as in this example from google searh... See the 4th line results... There is a pdf document with a complete description of the search engines...

    Google

    Hello Elindo586,

    Please see the links below. Seems like you need to achieve in the PDF file.

    How to optimize PDF Documents for search - YouMoz - Moz

    8 tips to make your PDF Page SEO - Search Engine Journal

    s https://acrobatusers.com/tutorials/make-your-PDFs-work-well-Google-and-other-search-engine

    Kind regards

    Vivek

  • including the extension in jdeveloper with ADF Faces?

    Hello

    We have an application with ADF Faces components that must be migrated to OracleAS weblogic 11 g Server (10.3.5).

    We strive to upgrade the application under jdeveloper 11.1.1.5.0.  I have 3 questions.

    1. which the ADF jdeveloper extension should download us for this purpose?

    We already seem to have the extensions 'Fusion Web Applications (ADF)' and ' Applications Java Desktop (ADF) "."

    2. during the upgrade, we were given an option to upgrade the ADF Faces in Trinidad, when this option has been chosen, we got a "unexpected mistake."

    is it necessary to go to TRINIDAD to be able to deploy successfully on weblogic 10.3.5? If Yes, is the extension for Jdeveloper MAVEN?

    3. in weblogic server, I understand, we need the extension JRF to support the length of the ADF, is there anything else that we need on weblogic server that the adf works?

    Thank you in advance.

    If the origins of your application of jdev 10g and runs on the OAS, you can migrate to Trinidad. No extension is required for this as the required libraries are already there. Maven is useless and will not work for 11.1.1.5.0. First version with the full support of MAVEN is 12 c.

    If you get an unexpected error during the migration from the old app to 11 g, you should try to find out

    (1) projects that is causing the error

    (2) file that is causing the error

    and work from there. There are some configurations that cannot be migrated (check the release notes), however they should not lead to unexpected errors. However, check the release notes.

    If you don't find anything and cannot pass through the error, you must open a SR with support.oracle.com.

    Next question is why migrate to 11.1.1.5.0 which is already obsolete.

    Timo

  • Using SQL Server with ADF BC and getting Houston - 29114 ADFContext aren't Setup error

    Hello... I work with ADF BC and my connection is with a MS SQL Server database.  I added the sqljdbc4.jar in my template project, and can't seem to connect with the DB and build an Entity/View/AppMod infrastructure.  However, once I deploy the application on the integrated WebLogic Server I get errors when ADF BC tries to connect.  I added a POJO supported data control and tried to debug but PPR reports an error when my key to call the code stripped of JDBC:

    Houston-29114 ADFContext is not configured to process this exception messages. Use the code of exception stack trace and error to investigate the root cause of this exception. Root cause error code is Houston-29000. Error messages settings are {0 = java.lang.NoClassDefFoundError, 1 = com/microsoft/sqlserver/jdbc/SQLServerException}

    ADF_FACES-60097: for more information, see the error log of the server for an entry beginning with: ADF_FACES - Exception during the PPR, #1 60096:Server

    Seems to me that the POT is not in the classpath on the WLS.  What is the problem? If Yes... How would have added that JAR, sqljdbc4.jar, the path of the WLS class.  I've done through the deployment of models, and he saw in the META-INF/lib directory that has been deployed.

    Thanks for any help!

    Do not apply the JDBC JAR (s) in the archives of application deployment. You must add the JAR to the classpath WLS JDBC (s). Change the commEnv.cmd/sh for this script:

    Using JDBC with WebLogic Server - 11g Release 1 (10.3.6) drivers

    Note that WLS is pre-configured with a number of brand WebLogic DataDirect JDBC drivers (including a SQLServer driver), so you can use it instead of adding a new driver if the DataDirect driver meets your needs:

    Using WebLogic brand DataDirect drivers - 11g Release 1 (10.3.6)

    WLS 10.3.5 documentation provides more detailed information:

    The MS SQL Server driver

    Dimitar

  • [Help needed] Several errors in X 40 with ADF security with or without custom login page

    OTN greetings community, I'm sorry to bother you again, but I need help again once, links to the relevant files (pastebin and imgur) are on the bottom of the post in the meantime ill try to explain my situation.

    I use version 11.1.1.7.0 for JDeveloper with (I assume) updates all of the current side.

    In my efforts to learn more about ADF, I had finished the Apps to build with ADF I guide I produce a 'simple' application to manage contacts, companies and their places of activity.

    With all my functions done and tested semi (small scale) I went ahead and and tried implement security.

    So, with the help of Andrejus Baranovskis Entry of Blog (have been using his blog as a source of information, has contributed to many situations, especially related bean) and fireboxtraining (Part1 and Part2) youtube videos, I have 2 pages, a Login Page (a dispatcher Panel 1 facet has only text showing the user names and passwords connection and the 2nd input text facet 2 related to the bean requesting the user name and Word 3rd password a button that calls the doLogin method) and an error page displays just the text.

    So after you have enabled security, create 2 users, create 2 roles of the company, creating application roles 2 and associating all 2 grants of right one to each role app giving privilege to see on the pages I want, I developed (my goal is that in the homepage, using a mixer according to user's role would display a region that all data can be changed or another that all data is read-only but I don't that have not yet implemented).

    So I went on the test page and unfortunately I hit the 1st wall would not display the login page (seemed to be always be update a blank page in firefox) so I checked if the pages are in the anonymous role and they were. So, as I saw in the video I deleted the page definition files in the Databindings.cpx file and I am past the 1st obstacle has shown the login page. So I typed the username and passwords and I hit my second wall (error 404 - Not found), I saw the code, debugged it and found that he wouldn't be able to hang or something like that (forgive me for my brutal inexperience) then I disabled the security and reactivated with pages of default form, and when it prompted me to type the user name and password I had hit my 3rd and last wall (error 401 - no allowed) which we I didn't wait, I went in the jazn-"Data.xml" and looked if the grants/permissions/roles were ok, in my inexperience, I don't find any problem, so beat I come here to seek support.

    Code:

    MyLoginBean

    MyJazn-"Data.xml"

    MyWeb.xml

    Error logs:
    OnDeployment

    OnLogin

    Screenshots:

    404 full

    401 full

    Sorry for the long post and to put the code in another site (not wanted to put this post more than it already is).

    Thank you very much for your time and your support.

    Hello

    Article http://www.oracle.com/technetwork/issue-archive/2012/12-jan/o12adf-1364748.html

    comes with a sample download, run and explore.

    http://www.Oracle.com/technetwork/issue-archive/2012/12-Jan/o12adf-524995.zip

    It includes all your use cases. So I suggest that start here

    Note that following the code has experienced problems with recent versions of the IDE instead of a side server before we recommend (and will amend accordingly our documentation) to use a redirect on the facesContext--> externalContext instead (I'm typing through while it's not his apparent

    recommended and more)

    ' Private Sub sendForward (HttpServletRequest, HttpServletResponse response, forwardUrl String query) {}

    FacesContext ctx = FacesContext.getCurrentInstance ();

    RequestDispatcher dispatcher = request.getRequestDispatcher (forwardUrl);

    try {}

    Dispatcher.Forward (request, response);

    } catch (ServletException to) {}

    reportUnexpectedLoginError ("ServletException", is);

    } catch (IOException ie) {}

    reportUnexpectedLoginError ("IOException", IE);

    }

    ctx.responseComplete ();

    }

    Frank

  • apex 4.0 with oracle 11g ee mail

    Hello

    I spent when you work with apex 3 I could work with apex mailsend very nice.
    Apex 4.0 with oracle 11g ee, I'm not able to send emails any more.

    Last error message in the queue is:

    ORA-29279: permanent SMTP error: 550 via this server without authentication.
    the smtp server has not been changed, the code is very well

    How can I go further?

    Thank you very much
    Florin

    Florin,

    Make sure that you use the relevent to instructions for your version.
    If you use 4.0 - you probably want the same script - with use of APEX_040000 appropriate.

    See the steps of INSTALLATION of document ITEM.

    http://docs.Oracle.com/CD/E17556_01/doc/install.40/e15513/otn_install.htm#CBHBABCC

    -Make sure that you don't drop the former users of apex framework before update or remove them from the ACL. It can cause you problems.

    -Tim St.

    P.S. Take a minute to update your profile so that your name is clear.

    Published by: Tim St. H., December 11, 2012 16:54

  • HTM file is no more runs when downloaded from the intranet site.

    Last week, I published my Captivate project and downloaded on an intranet site to test.  Everything was fine, I clicked on Project.htm and my e-Learning courses took place as I expected to run. I sent the final files published on the live site, and it worked as well.

    This week I download all of the files will not work.  I get a blank screen and an indicator of error at the bottom of my browser.

    Files already loaded in the site of the last work work. They are only working files.  Identical files, republished, new projects, for a completely different intranet site - nothing but a blank screen. Other users who load the files, or even copy the right files to another location to get the same error.

    SWF files work. Move files on my local drive, on a shared drive.

    My project is dead in the water.

    Any ideas?

    Hello

    From what you described, it would seem that all of the necessary files have not been uploaded. Either that, or for some other reason they will not be found. It is possible that maybe the server has changed from Windows to UNIX and now there is a problem with file name. (UNIX is case-sensitive, so the other will not work if you call myfile.htm. Under Windows, the two names would work without problems)

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • switching on .portals with a specific page on a portlet

    Hello
    If a user clicks a button in a portlet right in test1.portal (this test1.portal has 2 portlets, the left one and another is right portlet and portlet left has all the links during the click on each corresponding page link will appear right portlet through CPI), after clicking on a submit button in a portlet right in test1.portal request goes to a servelt and retrieves the required data from the DB and needs to display these data in another. testB.portal Portal say with a specific page on a right portlet (portlets testB.portal 3, a left and another is right portlet, left portlet has all the links and then click on each link of page corresponding is displayed in a portlet right by CPI, another portlet down right) with a page spicific in a portlet right in testB.portal. We use the IPC JSR 168 portlets.

    My question is, after obtaining the necessary data from db in the servlet, how to send the request to testB.portal with a specific page filled in a portlet right from testB.portal.

    Can someone pls help?

    Thank you
    DK

    Hello

    It really is not much integrated in the framework, WLP to support the passage of information between .portal files. By design, they are the 'level' of a portal which is the highest level information is shared between portlets.

    So my first suggestion would be to put all the portlets you want to interact together as part of a 'portal', in one .portlet file, and then you have many options for the transmission of data between portlets:

    http://download.Oracle.com/docs/CD/E15919_01/WLP.1032/e14244/IPC.htm#CIHIDHIC

    Kevin

  • Integration of WebLogic Portal with Lotus 8.5

    Hi all

    I'm working on a project that involves the construction of an intranet Portal and the customer has 8.5 of Lotus who wants to integrate in the Weblogic Portal using wsrp portlets. More precisely, they want to have in their lotus calendar Portal portlet, portlet messaging, lotus, lotus notes portlet, lotus sametime portlet... etc. I found an old documentation and examples of this kind of portlets developed by Oracle, but they do not work because some errors when they try to retrieve the configuration of Lotus. The documentation is this one: http://www.oracle.com/technology/products/ias/portal/point/lotusnotes/installation.html

    I tried to find the authors of this documentation, or perhaps who developed the portlets and ask them if they can adapt the portlets of integration between Weblogic Portale and Lotus Notes 8.5. If someone knows about this issue or can help me with fixing the problem I have with the portlets please let me know - my e-mail is [email protected].
    Thank you very much, your help is very appreciated!

    I found the installer on delivery.

    Go to the delivery and when you get to the media Pach search screen, select Oracle Fusion Middleware and operating system, and then click search.

    On the list of results, select Oracle Application Server 10g Release 3 Media Pack. Then, in the resulting list of parts, scroll down. the last one is 2nd "WebLogic Portlets for 10.3 Groupware integration for .

    Brad

Maybe you are looking for

  • Once ubuntu was last updated for firefox installed, MarketWatch site displays only the mobile site

    After that the latest patches installed (including updates of Firefox) Ubuntu http://www.marketwatch.com always displays the site www.marketwatch.com/m For some reason any marketwatch thinks I'm on a mobile device

  • manage bookmarks

    What happened to manage bookmarks in the bookmarks dropdown? Can I manage bookmarks from another access point?

  • HP MediaSmart player

  • Upgrade of RAM HP g6-1c87nr

    Hi all I think the upgrade of my laptop of 6 to 8 GB memory. So my question is, is it feasible? Which means that I have just to buy a 4 GB DDR3 SDRAM 1333 hz DIMM and replace the 2 GB one? Would this work? Thank you!

  • invoking the java object in a widget

    Hello is it possible to invoke java objects in a widget or only java application complete? for example, I tried: var args = new blackberry.invoke.JavaArguments('net.rim.device.api.system.Alert.startVibrate(25500);'); blackberry.invoke.invoke(blackber