Passing user/pass by URL (url.openstream())

Hi guys,
I have a tough one for you...hehe
In a JSP, I create a URL... and open it URL.openstream...read each line and write them into another file.
1)Since the calling JSP is in a directory that ask username and password, when I call the URL, it cannot open it because no username and password give access to the page.
How can I pass username and password?
2)I could let the called jsp in a public zone, but the problem is that even if I use jsessionid the session change... do you know why?
Thanks guys!

You should have session variables attached to your page. Check Connection and Session, you should be able to use something like getProperties ("userid")

Similar Messages

  • Url iView: passing user/pass as get variables.  Launching in new window

    Hi,
    I pass username and password as get variables from a url iView, and want a page containing this iView to open in a new page using the "Launch in new window" property set to "Display in a separate window". 
    When previewing the iView or page it is on, it works fine.  But when launching it from the detailed navigation, this does not work.  A new window is opened, but the user is prompted for username and password.
    The page to display is an external site, and we have only got the url with user/pass to access it.
    Any ides on what can be wrong?
    Best Regards,
    Bjorn

    Hi,
    Using the url in IE works fine.  It seems to work everywhere but in the portal menu.
    I have the appintegrator in the back of my mind, and will start to have a look at it.  We are also considering a OSS message - this must be a bug in the system as far as I can see.
    Bjorn

  • How to Hide user & pass in PORTAL URL

    Hi Experts,
    I need a help on portal URL. We are using SSA (Spend Analytics) in Portal. One of the option in portal is that you can generate an E-mail Link of a report which goes to users.
    Link looks like this for end user (They receive it via E-Mail)
    http://Host:Port/irj/servlet/prt/portal/prtrootxapps.analytics.ds_par.inbounds?guid=CC1E61FF_7B3F_45CB_A3BE_B00F6BD487B7&objType=REPO&objId=0DA4575B_3C28_E6D8_66C5_04008115C625
    Users should be able to view this link as soon as they click on it. If a user is already logged into portal and copy and paste the link, it works fine. However, if a user is not logged in and copy and past this link to IE, It automatically changes URL to something else and shows user & password
    This is how it looks like. URL changes to the following link..
    http://HOST:PORT/irj/portal?j_user=XYZ_USER&j_password=XYZ_PASS&submit_logon=true
    So I'm not sure what is making portal to redirecting the link to (http://HOST:PORT/irj/portal?j_user=XYZ_USER&j_password=XYZ_PASS&submit_logon=true) when they enter generated link (http://Host:Port/irj/servlet/prt/portal/prtrootxapps.analytics.ds_par.inbounds?guid=CC1E61FF_7B3F_45CB_A3BE_B00F6BD487B7&objType=REPO&objId=0DA4575B_3C28_E6D8_66C5_04008115C625) and why is it showing user/pass and from where is it picking user & password.
    I kindly request all experts to please help me in this. I want to hide users/pass and make sure the link works fine without getting redirected it.
    Your help is much appreciated
    Thanks in Advance!!
    Afi

    i don't understand!
    i need to create a userid parameter on this configuration file frmweb.cfg
    [myconfig]
    userid=
    host=
    port=
    por example
    {myconfig]
    # System parameter: default base HTML file
    baseHTML=base.htm
    # System parameter: base HTML file for use with JInitiator client
    baseHTMLjinitiator=basejpi.htm
    # System parameter: base HTML file for use with Sun's Java Plug-In
    baseHTMLjpi=basejpi.htm
    # System parameter: delimiter for parameters in the base HTML files
    HTMLdelimiter=%
    userid= what can i write here?
    host = ??????????
    on this sistem too many user acces theses report
    and how can i call report to use this parameter?
    sorry because my english is not good
    saludos desde panama

  • Is it possible to pass nQuireID (session ID) via URL ?

    is it possible to pass nQuireID (session ID) via URL?
    (how to get the session id ?)
    therefore, we dont need to pass the userid and password. (embedded in the URL)

    Ummm you can't get a session ID unless you login first, chicken and egg problem? Have you looked at implementing SSO? That's the proper way of solving integration issues, hard-coding the user ID and the password on the URL is a nasty and insecure "hack"...

  • Error while passing ODI variable in JNDI Url for JMS Queue XML

    Hi,
    Facing a weird problem while passing ODI variable in JNDI Url for JMS Queue XML.
    Below is the JNDI Url configured under ODI Topology:
    JNDI Url: t3://<host_location>?d=#TEST.SCHEMA_FILE&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
    where,
    #TEST.SCHEMA_FILE --> ODI variable storing xsd name and location
    Issue Description:
    If we restart ODI server then for the first run of any ODI interface using JMS Queue XML, it is unable to get the value for ODI variable present in JNDI Url (d=#TEST.SCHEMA_FILE).
    It throws error message saying: No XSD found
    Temporary Resolution:
    As a temporary fix if we hard-code and pass the value in that ODI variable as shown below, it will successfully go through.
    eg: JNDI Url: t3://<host_location>?d=C:\XSD\test.xsd&s=<schema_name>&JMS_DESTINATION=jms/<queue_name>
    Reverting it back to variable later will have no issues and subsequent run will succeed.
    But again anytime later if server is restarted then first run will have this issue.
    Want to have permanent fix for it.
    Any one having idea on it please share. Appreciate your help!

    What ODI version are you using? It could be related to the bug in the older version as described in support note Doc ID 1290326.1

  • Getting an error in Firefox when passing an apostrophe in the URL

    When I click on a button it is passing an apostrophe in the URL and redirecting to another page but got "Oops! We are sorry, there was integrity check error with your request. Please contact support" error in the Firefox browser. And the same URL is working in IE and Chrome browsers. Can you please help me on this issue.

    Hi, thanks for the reply. Firefox may converting the apostrophe in the URL into different characters and send that information to the other page but not sure.
    Firefox Encoding is set to Unicode (UTI-8). How can I see the failing to encode the apostrophe differently than the other browsers?
    All browsers are passing &#39; instead of apostrophe (') in the URL. So I have added the below code in the JavaScript and it is working in IE and Chrome but not in Firefox. Please let me know your suggestions.
    myredirect.replace(/&amp;#39;/g,"'");
    Sample URL: https://XXXXXXXXXX/XXXXXXXX/?first=abhina'v&middle=&last=kumar1&street=abhiXXXXXXXXXXXXXXXXXXX
    Thanks,
    Ramesh.

  • How to pass two parameters in one url?

    the tutorial teaches me to use
    /faces/Details.jsp?personId=#{currentRow.value['PERSON.PERSONID']}
    to pass one parameter.
    How can i pass two parameters in one url?
    /faces/Details.jsp?personId=#{currentRow.value['PERSON.PERSONID']}&personName=#{currentRow.value['PERSON.PERSONNAME']}
    is not right.

    The '&' character needs to be escaped, lest it be interpreted by the application server as a separator character in the HTTP query string. Instead of '&', try '%26'.
    // Gregory

  • How to pass the JCo destinations as URL params?

    Hi,
    I have requirement to pass my JCo names as Url Params.
    jcoParam = "WD_ORD_RFC_METADATA_DEST:MNR "+" WD_ORD_MODELDATA_DEST:MNR";
    how do I combine and sent to URL params
    urlParameters.put("sap-wd-arfc-useSys",jcoParam);
    I am passing like this but the URL will take one parameter
    with one name but I need to pass the same parameter with diffrent Jco destination how to solve this please guide in this.
    I need like this But
    Url will take one parameter with sap-wd-arfc-useSys this name only the parameter sap-wd-arfc-useSys name is not taking once again .
    sap-wd-arfc-useSys=WD_ORD_RFC_METADATA_DEST:MNR
    & sap-wd-arfc-useSys=WD_ORD_MODELDATA_DEST:MNR
    Any body suggest on this.
    Thanks,
    Lohi.

    Hi Lohita,
    The parameter sap-wd-arfc-useSys should be given in the iview properties in the Content Administrator. The portal will be able to read the parameters properly even when you repeat the parameters like
    sap-wd-arfc-usesys = WD_ORD_RFC_METADATA_DEST:MNR & sap-wd-arfc-usesys = WD_ORD_MODELDATA_DEST:MNR in the iview properties.
    You will not abe able to pass it from the application as we would be using HashMap to pass the url parameters.As far as i know there is no other parameter available for the same purpose. Try giving the same in the iview of that applicaiton, it will work.
    Regards,
    Sharadha

  • Passing 2 varibles through a URL

    I don't know how to pass 2 variables through a URL. I am
    familiar with ASP
    but it doesn't work the same. Please help
    <cflocation
    url="payment.cfm?username=#FORM.username#&email="#FORM.email#"">
    Wally Kolcz
    Developer / Support

    It looks like you've got an extra set of quotes:
    Take out the double quotes around #FORM.email#
    I think that will solve the problem you are having with them
    not showing up in the hidden form fields as well.

  • Passing a cookie with a URL call

    Hi there,
    Is it possible to pass a cookie with a url call?
    Thanks in advance!
    Ryan

    I should probably clarify a bit. The goal is to pass a cookie to a url call in order to keep a session alive. It's for a part of an AIR app that pulls in a html frame that requires a login.

  • Passing double data in go url

    Hi guys
    i need to pass double value in Go url how to do that... as i am getting error:
    '<a href="http://localhost:9704/analytics/saw.dll?Go&Path=/shared/test/cust_details&Action=navigate&P0=1&P1=call&P2=%22cust%20dim%22.%22cust%20id%22&P3='||CAST("cust dim"."cust id" AS DOUBLE)||'">'||"cust dim"."cust id"||'</a>'[nQSError: 10058] A general error has occurred. [nQSError: 22020] Function Concat does not support non-text types. (HY000)
    thanks

    Hi Kart
    thanks for your reply.. i have tried char as well as varchar but still getting same error :(
    '<a href="http://localhost:9704/analytics/saw.dll?Go&Path=/shared/test/cust_details&Action=navigate&P0=1&P1=call&P2=%22cust%20dim%22.%22cust%20id%22&P3='||CAST("cust dim"."cust id" AS CHAR(100))||'">'||"cust dim"."cust id"||'</a>'
    '<a href="http://localhost:9704/analytics/saw.dll?Go&Path=/shared/test/cust_details&Action=navigate&P0=1&P1=call&P2=%22cust%20dim%22.%22cust%20id%22&P3='||CAST("cust dim"."cust id" AS VARCHAR(100))||'">'||"cust dim"."cust id"||'</a>'Any other option?
    regards

  • How to pass user name and password in openConnection method ?

    Hi, Exports,
              I am trying to post data from applet to another application which is
              protected by network password.
              How to pass user name and password when I use openConnection method? In java
              doc, this method looks like do not accept these two parameters.
              Thanks
              ----- my code in applet ---------
              URL url = new URL("http://127.0.0.1/xml/index.cfm");
              URLConnection connection = url.openConnection();
              connection.setDoInput(true);
              connection.setDoOutput(true);
              connection.setUseCaches(false);
              connection.setAllowUserInteraction(false);
              DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
              dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
              dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
              dos.writeBytes("Content-Type:
              multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
              dos.writeBytes("Host: "+host+":"+port+"\r\n");
              dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
              dos.writeBytes("Connection: Keep-Alive\r\n\n");
              dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
              on: form-data;name=\"xmlDoc\"\r\n\r\n");
              dos.writeBytes(buff.toString());
              dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
              dos.close();
              

    you need to negotiate Authentication in ur applet code...
              For example:
              If u r using Form based auth u need to send Post a request with j_user_name &
              j_password to the action j_security_check. and when server returns back the
              cookie
              u need to hold it and pass that cookie to the each and every request made to the
              protected application.
              Basically u need to imitate the browser.
              regards
              aseem
              David wrote:
              > Hi, Exports,
              >
              > I am trying to post data from applet to another application which is
              > protected by network password.
              > How to pass user name and password when I use openConnection method? In java
              > doc, this method looks like do not accept these two parameters.
              >
              > Thanks
              >
              > ----- my code in applet ---------
              > URL url = new URL("http://127.0.0.1/xml/index.cfm");
              > URLConnection connection = url.openConnection();
              > connection.setDoInput(true);
              > connection.setDoOutput(true);
              > connection.setUseCaches(false);
              > connection.setAllowUserInteraction(false);
              > DataOutputStream dos = new DataOutputStream(connection.getOutputStream());
              > dos.writeBytes("POST " + path + " HTTP/1.0\r\n");
              > dos.writeBytes("Referer: http://127.0.0.1/XML/index.cfm\r\n");
              > dos.writeBytes("Content-Type:
              > multipart/form-data;boundary=---------------------------7d0b414b04\r\n");
              > dos.writeBytes("Host: "+host+":"+port+"\r\n");
              > dos.writeBytes("Content-Length:" + buff.length()+"\r\n");
              > dos.writeBytes("Connection: Keep-Alive\r\n\n");
              > dos.writeBytes("-----------------------------7d0b414b04\r\nContent-Dispositi
              > on: form-data;name=\"xmlDoc\"\r\n\r\n");
              > dos.writeBytes(buff.toString());
              > dos.writeBytes("\r\n-----------------------------7d0b414b04--\r\n");
              > dos.close();
              >
              > ------------------------------------------
              

  • Oracle 9i running forms and reports with user/pass

    Hi all!
    How can I hide the user name and password in the internet explorer as it is shown in the full path for the sake of security I need it and also how can I pass the user/pass from a form to report without showing in address bar of Internet Explorer.
    Regards
    Mayank Sharma

    Dear Mayank,
    You can use "CGICMD.dat" file. This file can be used to add key mappings.
    You add following lines at the end of this file.
    MYKEY: USERID=<user_name>/<password>@<connection_string> %*
    You need to restart your OC4J Instance to make above changes effective..
    Then, in your web.show_document url include "CMDKEY=MYKEY".
    This will definitely solve your problem.
    Regards,
    Manish Trivedi
    Ambuja Cement,
    India.
    [email protected]

  • Pass User Picked values to Excel Slicers

     Hi, Is there a way to pass values from an external page to an Excel Slicer in a Workbook(which is on sharepoint) through a URL or something?
    Our Front End Report is a .NET web page, and we want to be able to pass User picked values like Year = 2014, Month=Jan etc from that web page to a Excel Pivot Table(with Slicers on Year, Month etc).
    Is this possible?
    Any help is appreciated.
    Thanks

    Hello,
    Personally, it is impossible.
    You can also try to open a discussion at Excel IT Pro forum regarding this issue to confirm this.
    Excel IT Pro discussion forum:
    http://social.technet.microsoft.com/Forums/office/en-US/home?forum=excel
    Regards,
    Elvis Long
    TechNet Community Support

  • Hide user and password in URL

    Hi Experts,
    I need a help on portal URL. We are using SSA (Spend Analytics) in Portal. One of the option in portal is that you can generate an E-mail Link of a report which goes to users.
    Link looks like this for end user (They receive it via E-Mail)
    http://Host:Port/irj/servlet/prt/portal/prtrootxapps.analytics.ds_par.inbounds?guid=CC1E61FF_7B3F_45CB_A3BE_B00F6BD487B7&objType=REPO&objId=0DA4575B_3C28_E6D8_66C5_04008115C625
    Users should be able to view this link as soon as they click on it. If a user is already logged into portal and copy and paste the link, it works fine. However, if a user is not logged in and copy and past this link to IE, It automatically changes URL to something else and shows user & password 
    This is how it looks like. URL changes to the following link..
    http://HOST:PORT/irj/portal?j_user=XYZ_USER&j_password=XYZ_PASS&submit_logon=true
    So I'm not sure what is making portal to redirecting the link to (http://HOST:PORT/irj/portal?j_user=XYZ_USER&j_password=XYZ_PASS&submit_logon=true) when they enter generated link (http://Host:Port/irj/servlet/prt/portal/prtrootxapps.analytics.ds_par.inbounds?guid=CC1E61FF_7B3F_45CB_A3BE_B00F6BD487B7&objType=REPO&objId=0DA4575B_3C28_E6D8_66C5_04008115C625) and why is it showing user/pass and from where is it picking user & password.
    I kindly request all experts to please help me in this. I want to hide users/pass and make sure the link works fine without getting redirected it.
    Your help is much appreciated
    Thanks in Advance!!
    Afi

    Hi Sinivasan,
    I thought about it but I do not see User Mapping Field stating anything. It's empty.
    Here is how it looks like:
    Authentication Ticket Type : SAP Assertion Ticket
    Logon Method : SAPLOGONTICKET
    User Mapping Fields : <empty>
    User Mapping Type : admin,user
    So.. I really don't know why and from where is it picking up user/pass to URL. We are not even using Anonymous Login. Any other thing you could think of the possibility?
    Thanks
    Afi

Maybe you are looking for

  • Itunes match step 2

    I'm having major issues trying to transfer my itunes my from my pc to my new imac. tried migration assistant and couldnt find any of the files, tried direct copying and it couldnt seem to find any files upon playing, then via homeshare but not copied

  • I have a MacBook Pro 10.5.8 that I never upgraded.  What is my best course of action to bring my computer software up to date?

    How do I best upgrade my MacBook Pro 10.5.8?  I currently cannot download itunes 11 or sync my new iphone 4s with iOS6.  Also, Firefox no longer supports my computer's current system.  I need the best way to catch up (not sure Snow Leopard...Lion...e

  • Runtime Error:     READ_REPORT_LINE_TOO_LONG

    Hii All, I have created a report in ALV. i have used the function module "REUSE_ALV_FIELDCATALOG_MERGE".I have debugged the whole report but when watch point comes at this fynction module it gives runime error as READ_REPORT_LINE_TOO_LONG. Can anyone

  • App Store closing iTunes unexpectedly.

    I have a 21.5" 2.7 GHz iMac purchased during July 2013, running 10.9. Twice recently, the App Store icon suddenly displays a "1" indicating an update, and when it does it unexpectedly closes iTunes. I click on App Store and there are no updates. The

  • My hinges on my Mac are loose

    It is slighly loose, and I know it won't be a big deal to fix. I'm just scared that it will cost a lot to repair. Any guesses? I'm going to apple tomorrow