HTTP connection authentication - Please Help

I need to call a URL (that passes user and password parameters) to log on.
Next, I need to call another (and different) URL to perform an insertion. This operation requires the user to be logged on. I could not establish the authentication via HTTP connection.
ANY HELP WILL BE GRATLY APPRECIATED.
This is my source code:
URL url = new URL("http://myserver/validate?
as_user=X&as_password=Y");
URL url2 = new URL("http://myserver/save?as_categ_id=82");
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
BufferedReader in = new BufferedReader(new InputStreamReader
(connection.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
connection = url2.openConnection();
in = new BufferedReader(new InputStreamReader (connection.getInputStream()));
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
bufferedWriter.write(inputLine);
bufferedWriter.flush();
in.close();
}catch(Exception x){}
Thanks in advance.
null

Hi,
your problem is very simple.
The class java.util.Vector has no methods get() without parameter and no method next().
Try using a for-loop with oprNames.size() and method get(i) with i as your index.

Similar Messages

  • I am have trouble with 2 new 21.5" iMacs losing wifi connection from my network. I have 4 other vintage iMacs that never lose connection. Please help.

    I am have trouble with 2 new 21.5" iMacs losing wifi connection from my network. I have 4 other vintage iMacs that never lose connection. Please help.

    This subject has been talked/written about a lot, after Lion was introduced. A solution from Apple has not yet been published, everybody is waiting.
    Try for instance https://discussions.apple.com/thread/3734081?start=15&tstart=0, but there are more discussion groups with the same subject: frequently lost WiFi-connections in newer Macs running Lion or up.

  • Have updated my ipad2 to IOS6 , but now Iam unable to make facetime over wifi ...it keeps displaying connection lost. please help

    Have updated my ipad2 to IOS6 , but now Iam unable to make facetime over wifi ...it keeps displaying connection lost. please help.
    Also my facebook application is also not working .it just hangs itself. tried uninstalling and reinstalling. yet it isnt working. please help

    Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • I just got the new ipod touch (5th generation) and it will show up on my computer but it will not show up on itunes and it won't connect. Please help!

    I just got the new ipod touch (5th generation) and it will show up on my computer but it will not show up on itunes and it won't connect. Please help!

    See:
    iOS: Device not recognized in iTunes for Windows
    You need iTunes version 10.7

  • I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    I lost my iPhone 3 days ago.. it wasn't connet to internet and I don't know how find it without the connection.. please help me and give me some advices!!

    Change your passwords.

  • My ipad 2 is no longer connecting to itunes on my computer but my ipod is connecting. Please help.

    Recently, my ipad stopped appearing on itunes when I connect to my computer. I restarted apple mobile service but there was no difference. When I connected my ipod nano 2nd gen, it came up on itunes. Please help me resolve this. Thank you.

    Hi Chukwudinma!
    Here is an article that will help you troubleshoot this issue:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • I don't understand anything in HTTPS...please help!

    Hi,
    I want to connect to the servlet through HTTPS (from an applet).
    I wrote these in my code and it works:
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
              Properties properties = System.getProperties();
              String handlers = System.getProperty("java.protocol.handler.pkgs");
              if (handlers == null) {
              properties.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
              else {
              properties.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol|".concat(handlers));          
    //          properties.put("socksProxyHost", servletPath.getHost());
    // properties.put("socksProxyPort", servletPath.getPort());
    System.setProperty("javax.net.ssl.trustStore", "C:\\Documents and Settings\\VHORVATH\\.netbeans\\5.0\\jakarta-tomcat-5.5.9_base\\conf\\.keystore");
    System.setProperties(properties);
    But I must know where the keystore file is on the client or else -> sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    But the applet is downloaded from the server and we can't find out on the server what the path is on the client... or yes? Do I mean wrong?
    Please help me to solve this problem(?) !
    Thanks!
    Viktor

    You don't need a keystore at the client, you need a truststore which trusts the certs in the server's keystore. The one distributed with the JDK normally does this as it has lots of trusted root certificates in it so you shouldn't need to specify the trustore path at the client (i.e. to the applet). It may also be that the browser is using its own truststore rather than the JDK/JRE's so make sure it trusts your server, by whatever means are appropriate to the browsers concerned (i.e. don't ask me!).
    Also you are getting mixed up between System.setProperties(p) and System.setProperty(). The former will overwrite the latter. Either do everything with System.setProperty or with p.setProperty() followed by System.setProperties(p).
    However it works anyway because you haven't needed to do add the provider or set the handler package since 1.4, and I don't know that adding a security provider will even work in an applet environment. You can just delete all this code.
    EJP

  • Network connection problems, please help!

    I have had an iPod Touch (4th generation) for over a year now and it worked fine. Today, something went wrong with my network connection. One moment it says that I'm connected to a network, and a few seconds later it says I'm not connected... Then a few seconds later it's connected again. I have full wifi bars, and it does it throughout my whole house. The wifi symbol keeps going on and off. I tried turning my Verizon Westell Model 6100G Modem off and back on because this normally fixes my wifi connection problems. This didn't work. Then I tried turning my iPod off and back on. This didn't work. I tried turning the wifi off and back on. This didn't work. I tried forgetting my network and signing back in. This didn't work. I also tried resetting the network, and this didn't work either. I'm not having any connection problems with my laptop, it's working fine. It's only my iPod. I'm still able to use the wifi, but for a split second, it will not work. I'm not sure what else to do. It's very annoying! I'm going to see if it does this at other peoples houses with their wifi. Can any one tell me what's wrong and how I should fix it? My only theory is a broken antenna...Please help! Thanks!

    I have two things you could try.
    1. Plug your iPod into the host computer that which the network is based around because sometimes the network has trouble identifying a device if it has been a while since you plugged it into the computer.
    2. Find some way to get your network information (IP address, Subnet Mask, Router, DNS numbers) from another device on the network (e.g. laptop). Then go to Settings > Wi-FI and find your router and tap the blue arrow to the right of the name and tap the tab that says "Static" and enter this information accordingly. Then exit back to the network names menu and re-enter your passcode for your network (assuming you have a passcode)

  • New Infinity connect issues - please help

    We are having ongoing issues with getting BT infinity installed to our new house.  I really need someone that can actually help us find out what is wrong and how we can resolve the issues we are having.
    It all started a few months ago when we ordered BT infinity and a new phone line to our new Chapel conversion house.
    Initially there were some issues with the engineer being unable to get the phone line to the house. After numerous phone calls and several engineers visits, we these have now been resolved and we do have a working telephone.
    The problem seems to be with the Infinity. Nobody can give me an answer as to why we have not yet got a connection.
    When the phone engineer visited he said that he would try and connect the Infinity in the green box. – When he went to do this he tried to obtain our patching information and was informed that there was no live order for infinity on our number… As there was nothing more he could do he left.
    We then checked with BT and they confirmed that we do have an order for infinity and that there was a problem that needed and engineer to look at. (We have a box and are paying for the service already…
    We were told last week that an engineer was going to attend on Monday 13th Jan and that we definitely would have a connection by last Monday at the latest… - no engineer attended despite my wife spending her 3rd day in the house waiting for an engineer!
    She phone BT on Tuesday and was told that there was a problem and she would be contacted by Thursday Morning at the latest. – Needless to say , No phone call!!
    We really need to sort this connection out.  Is there anyone who can take this and run with it until it’s sorted? – We are getting nowhere talking to random individuals who have no real history of our connection history.
    Please Help!
    Doug

    Hi dougchapel,
    Thanks for posting and welcome!
    I'm sorry for the problems you're having getting set up on BT Infinity.  I can help get you sorted from here.  Click on my username and under the "about me" section you'll see the link to get in touch with us.
    Cheers,
    Robbie
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Firefox won't establish a connection. Please help

    Hello,
    My Mozilla Firefox has worked for ages and all of a sudden when my father tried to open it, it came up with a message saying:
    'Unable to connect
    Firefox can't establish a connection to the server at www.ebay.com.au.
    The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    If you are unable to load any pages, check your computer's network
    connection.
    If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.'
    I have checked all the settings and everything looks right, my internet is connected fine, other apps using the internet works fine, I have checked the fire wall and I have tried to troubleshoot problems. Nothing seems to be working it just keeps saying the same thing. I don't know what else to do, can someone please help me? I need to get it working before tomorrow because my father uses it and he knows how to use it and where everything is. Please, please help.
    Thank-you heaps!
    Zoe

    UAC is turned off ?
    Did you firefox "Run as administrator" ?
    thanks

  • Ipod error message when connected. Please help

    Windows XP
    I have had my 30 gigabyte ipod for almost a year and i've never had any problems with it before. But recently our area wasn't able to get broadband. So i was unable to download the recent ipod and itunes updates. I have done that now.. but i think something has affected my ipod. When i plug it into my computer nothing comes up on my ipod screen and i can continue browsing music etc.. i know this isn't supposed to happen. And on my computer an error message comes up saying "USB device not recognized. One of the USB devices attached to this computer has malfunctioned, and Windows does not recognise it. "
    Please help me!

    Okay. So i'll tell you the steps i have taken. I've uninstalled all the ipod updaters i had on my computer, eg 2006 and 2005.. and i reinstalled the latest version of itunes. I also went to device manager and all that but it only came up in the list at "unknown device" and i uninstalled the driver and tried to reinstall it but it came up saying it was an unknown device again. I tried right clicking on it and going "scan for hardware updates" but it told me the one i have installed is the nearest match. I also tried connecting my ipod to my computer in disc mode which did nothing. But i have discovered my ipod charges when i plug it in.. but the computer freezes on the black dos screen (as it always has for me when i turn the computer on with the ipod plugged in) and the ipod remains charging. but it seems if i plug it in after windows has loaded it's not even recognised.
    I'm sorry for making it so long but i really really need help

  • MySql - Connection Props - Please help - willing to pay

    Hi,
    My setup:
    Windows XP
    IIS ver 5
    MySQL databse
    Dreamweaver MX 2004
    Language ASP.NET VB
    This is driving me round the bend have searached all forums
    and nothing is pointing me in the right direction.
    1) First question, can I actually use dreamweaver MX 2004 to
    create ASP.NET VB pages and connect to a MYSQL database?
    The reason I ask is I have set up a system DSN in >
    control panel > administrative tools > Datasources (ODBC)
    All works fine connection is successful etc. (MySQl ODBC 3.51
    Driver)
    I then open dreamweaver, create new ASP.NET VB page. Go to
    the databases panel click the + sign and have 2 options:
    OLE DB connection or SQL Server connection. I assume its not
    the latter as that is for SQL seerver not MySQL. I have tried every
    combination of the OLE DB connection (2options - Templates or
    Build)
    Templates:
    Oracle (Microsoft Provider)
    Oracle (Oracle Provider)
    Microsoft SQL Server
    Microsoft Access 97 (Jet 3.5 provider)
    Microsoft Access 2000 (Jet 4 provider)
    UDL File
    I don't think any of the above are correct for connecting to
    a MySQL database, so I try:
    BUILD
    List of providers this time are :
    Microsoft ISAM 1.1 OLE DB Provider
    Microsoft Jet 4.0 OLE DB Provider
    Microsoft OLE DB Provider for Data Mining Services
    Microsoft OLE DB Provider for Indexing Service
    Microsoft OLE DB Provider for ODBC Drivers (***** I Guess its
    this one? ****)
    Microsoft OLE DB Provider for OLAP Services 8.0
    Microsoft OLE DB Provider for Oracle
    Microsoft OLE DB Provider for SQL Server
    Microsoft OLE DB Simple Provider
    MSDatashape
    OLE DB Provider for Microsoft Directory Services.
    So I choose the one highlighted above for ODBC drivers as I
    think this one is correct?
    1st option - Use data source name which has a dropdown box
    and I can choose my dsn as mentioned earlier.
    or 'Use connection String' - I Don't use
    2nd Option Logon to server info
    Username ***Is this the username and password of mySQL
    database because if so it doesn't work, have also tried leaving it
    bland and every time i do a test after choosing the initial catalog
    to use I get the eror message:
    Test connection failed because of an error in intialising
    provider. Catastrophic failure!
    All I want to is connect to a bl**dy databse so I can teach
    myself the basics but can't get past this first hurdle.
    Someone please help! Thanks in advance.
    Password

    For your eMac, you will need to go with a *miniDV camcorder*, such as the Canon ZR series (current lineup is the ZR900/930/950/960). They all have image stabilization & take stills; the 900, 930 and 960 also have an external mic input.
    You may also want to look into an earlier Canon Optura or Elura series camcorder or similar miniDV camcorder from Sony, JVC, Panasonic, etc. There aren't many new miniDV models available anymore, but you can still find them and they are on the lower end of the price scale these days!
    B&H Photo is a great supplier to deal with and you will be hard pressed to find prices lower elsewhere.
    The eMac does not support AVCHD, so that eliminates any of those newer camcorders (you need an Intel based Mac to capture & edit AVCHD video). The Canon FS line unfortunately records to MPEG2 MOD files, which needs to be converted before it can be imported into iMovie or Final Cut Express. And the conversion is not simple.

  • I am facing a weird problem with my iphone 4s Wi-Fi connectivity. As i connect my iphone to my office Wi-Fi, internet works in one building, but it doesnt work in the other building, although the phone shows Wi-Fi is connected. Please help me out!!

    I am facing a weird problem with my iphone 4s Wi-Fi connectivity. As i connect my iphone to my office Wi-Fi, internet works in one building, but it doesnt work in the other building, although the phone shows Wi-Fi is connected in the other building. This problem was not there earlier but has occured recently. I would also like to mention that none of my other colleauges who uses iphone are not facing this issue. Please help me out!!

    Assuming you entered the correct WiFi password for your network, see these articles:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS and OS X: Recommended settings for Wi-Fi routers and access points

  • How can i fix my my iPad i downgraded it to 8.1.3 to 8.1.2 and when some error occured the iPad suddenly shut down and reopen and it only show the icon of iTunes and the connect symbol  please help urgently needed

    Hi please help me i try to downgrade my iPad ios to 8.1.3 to 8.1.2 and an error occursd and can't open my iPad only the icon of iTunes and charger appeared please help

    That means that it's gone into recovery mode - connect the iPad to your computer's iTunes and reset it back to factory defaults.
    Downgrading the iOS version isn't supported by Apple.

  • My computer does not recognize the Airport Connection.  Please Help

    I just purchased the Apple Base Station and Apple Extreme. My internet connection is made through a DSL Modem(My carrier is Frontier Communications). I am having a very hard time getting my computer to recognized the Airport. Can someone please help me. Thanks

    Unplug the modem power. Connect an ethernet cable from the modem to the AEBS WAN (circle of dots port. Connect an ethernet cable to the LAN (<->) port, and to the ethernet port on your computer. Run the AirPort Admin utility. Configure your base station, giving it a name, administrator password, network name (SSID) and a password. Select a Configure option (ethernet or PPPoE, fill in any ISP information. Update the base station. Disconnect your computer.
    Shut Down the computer. Make sure your AirPort Extreme card is firmly snapped into its socket, and that the antenna wire if snapped into place. Boot up. On the computer, go to System Preferences>Network and make sure PPPoE is disabled on your Ethernet Tab. You should now be able to see your network in the AirPort Menulet. Log on to your network and see if AirPort Admin Utility can be run (it should). Quit AirPort Admin Utility.
    Plug in the power to the modem and run a web browser. Can you connect to the internet (you should be able to)?

Maybe you are looking for

  • 'Insufficient system resources exist to complete the requested service' issue

    Hello, when trying to open some specific UNC path im getting -> Insufficient system resources exist to complete the requested service. Some do work though, as im able to access 3 out of 5 network drives. After a restart, everything is back to normal.

  • Help! dynamic class loading.

    Heya. I'm trying to write a server type app that will be able to load up new objects without having to stop the main program and recompile. Its going to read the names of the objects from a text file and then if there is a new object it will create a

  • Need help with Photoshop and Runtime Error

    Runtime Error Photoshop & MS Visual C++ WIN7 32bit Photoshop will appear to launch then dies with a ('MS Visual C++ Runtime Error!' = Application requested the runtime to terminate it  an unusual manner. Contact application's support team for more in

  • Illustrator CS6 and Cut Studio problems

    When I cut with Cut Studio from Illustrator CS6, my stuff may or may not cut completely.  A lot of the time it stops midstream then i have to restart it cut again.  Very time consuming and not profitable either.  Anyone else with this problem and can

  • SQL report for LIKE SEARCH

    hello all , The below SQL seems to running fine in the SQL developer but acts different in APEX. I have 2 select lists 1, :P40_C 2, :P40_CONTRACTOR When I do not enter any value for the above select list, I do not return any records . I would like to