Sending url please help

Hi. How can I sent responce to server using URL class?
I do like this:
URL url = new URL("http://test.com:5430/");
URLConnection urlConnection = url.openConnection();
urlConnection.setDoInput(true);
urlConnection.setUseCaches(false);
urlConnection.setDoOutput(true);
urlConnection.setRequestProperty("content-type", "application/x-www-form-urlencoded");
urlConnection.setRequestProperty("Accept-Language", "th,en-us;q=0.5");
// send data if it has
OutputStreamWriter out = new OutputStreamWriter(urlConnection.getOutputStream());
out.write("?username=xxx&password=xxx");
but it doesn't work. Please help. Thanks.

Thanks everybody! I solved this problem. It was more easy than I thought:
URL url = new URL("http://test.com:5430/?username=xxx");
URLConnection uc = url.openConnection();
uc.setDoOutput(true);
uc.setDoInput(true);
// Read from Connection
InputStream in = new BufferedInputStream(uc.getInputStream());
Reader r = new InputStreamReader(in);
int c;
while((c = r.read())!=-1)
     System.out.print((char)c);
}

Similar Messages

  • How do I remove an email account from iPhoto on an iMac? I set it up with the incorrect password and can no longer send photos, please help!

    "Removing email account from iPhoto"
    How do I remove an email account from iPhoto on an iMac? I set it up with the incorrect password and can no longer send photos, please help!

    To follow Larry's advice, select your email account in the list of accounts and click the "-" button to remove the account:

  • TS2755 I recently upgraded my IPhone and for 1 person I began receiving this "7233375 Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code". I receive text from this person but cannot send. Please help. Thank you.

    I recently upgraded my IPhone and for 1 person I began receiving this "7233375 Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code". I receive text from this person but cannot send. Please help. Thank you.

    Hi there
    I’d be happy to help with this messaging error! This will be due to the device storing the number incorrectly. Please do the following to resolve the issue:
    Delete texts from both old number and new
    Delete any call logs including these numbers
    Delete old number from contacts
    Delete new number from contacts
    Restart device
    Send text to the new number directly (do not save as contact)
    Once the text sends successfully, you can then save as a new contact
    I hope this helps!
    Charise

  • My iMessage isn't letting me receive pictures but I can send them please help!

    MMy iMessage is not letting me recieve pictures but I am able to send them please help!

    iOS: Troubleshooting Messages

  • Multi Select Item to be passed in URL ( Please help urgent)

    Hi ,
    I have an item P1_PRODUCT('SOAP','PASTE','BRUSH')  in page 1.
    User selects multiple products and submits and a report is displayed .
    I have an hyper link on one of the column and when user clicks this > target is URL
    and i have passed P1_PRODUCT to page2 using the link
    P2_PRODUCT is hidden item.
    javascript:popUp2('f?p=&APP_ID.:2:&APP_SESSION.:P2_PRODUCT:&P1_PRODUCT.',500,500);
    My problem here is no matter what i do P2_PRODUCT is always set to only one value. not able to pass all three at once.
    Please help...

    It is possible to include commas in item values
    2.5 Understanding URL Syntax
    List of item values used to set session state within a URL. Item values cannot include colons, but can contain commas if enclosed with backslashes. To pass a comma in an item value, enclose the characters with backslashes. For example:
    \123,45\
    But it may be that your item value contains colons.
    There could be workarounds for you, depends on what your issue actually is - I'm not convinced is a delimiter issue, rather timing on session state values. Are you able to produce a demo on apex.oracle.com?

  • Everytime I want to update the latest iTunes or iPhone software I get the following error message "Cannot open the URL" please help?

    I need to update my iTunes and my iPhone 3GS to the latest version and evertimes I click on "update" I get the following error message displayed - "cannot open URL".  I have checked the permissions on my windows firewall and iTunes is not blocked.  PLease can anyone give me some other suggestions as its really frustrating and I want to download ringtones etc but can't do so without the latest software versions of iOS etc.  Please help?  Thank you

    Try temporarily disabling your firewall and antivirus software and try again...
    See here for Connection Issues
    http://support.apple.com/kb/TS1379
    From Here
    http://www.apple.com/support/itunes/troubleshooting/

  • IChat can't send file, please help

    After updating to OSX 10.4.4 my iChat cannot send any file, but it allows me to receive it. When I try to send the message to another person, it shows that it is waiting for me to start and in a couple seconds later I would get an error message stating that the other person did not accepth the file.
    I have seen these problem around the forum, but yet any of them have been answer.
    Is it the new 10.4.4 that is causing it? Anyone with solution please help.
    P.S. I also tried open port 5190, but it is not working.

    Hi APT015,
    Ok.
    Most Connection devices come, as default, with DHCP turned on.
    This means the device (Linksys and Airports) are their own server giving out Addresses dynamically to your Local Network.
    As by default most devices have port 1-1024 open and not part of any methods to open them you tend to be able to add a whole bunch of DHCP server together and applications that use ports below the 1024 threshold can work (web browsing, Mail, FTP to upload Web pages to a server or download files)
    Having IP given out by different devices creates Subnets on your LAN.
    Because of the way routers in particular handle IP addresses given out by previuos devices your computer can recieve more than one IP address on the LAN (Although only one can be seen on the Mac)
    Pause.
    So you have several things to deal with here.
    1) The Mac Firewall if it is On.
    2) The DHCP serving on your Network.
    3) The way the method you use of Opening the ports in one device effects the result of opening the ports on the other device.
    To Solve 1) look at the table on this page
    Also look at the instructions and Pics of the Firewall on this one
    To solve 2) do this:
    Open Airport Admin Utility found in Application/Utlities
    Log on to the Airport
    Go to the NEtwork tab
    Deselect "Distributing Addresses"
    Apply cahnges
    As this also turns of NAT in the Airport it adds to solving 3)
    For Finishing 3) completely do this:
    Type 192.168.1.1 in to your web browser like a page address
    Type Admin for both User ID and Password.
    Go to the Adminsrtaion tab
    Enable UPnP
    Save Settings.
    For other people following this go to http://portforward.com/routers.htm and follow the links to iChat and the Pics and Instructions for your modem.
    You should use this site to see if the Pics show where the UPnP is if your Modem has it, not to mention finding out the default IP address of the modem and the default User ID and Passwords.
    What this achieves is the modem is still doing DHCP to your Network. It is opening the ports by UPnP. The Airport is now basically a wireless access point. The Airport and computer now have IP addresses from the Modem only.
    Ralph

  • Optonline not sending email- please help

    im trying to put optonline onto mac mail and it can recieve email just fine but i cannot send email. i checked the outgoing server and its correct. my password and user name are correct. please help!

    Yes, try changing it to 587 for starters. You should check optonline's online help to see if they recommend a different port for SMTP. You might also need to change your authentication settings.
    Matt

  • Error Sending Message///​please help

    has everyone know this situation??already 2 month error sending message ,but i can received and make a phone call
    when sending message then comes message "protocol error" or "requested facility not subsscribed" for your info am still have balance in my credit or am using post paid ////thank you very much friends
    type 8320(curve)

    Really, there are many users with the same problem in the forum, all of them with prepaid accounts, try with upgrading the software and let me know, here is the link
    http://www.blackberry.com/btsc/search.do?cmd=displ​ayKC&docType=kc&externalId=KB03621&sliceId=1&docTy​...
    If I help you with any inquire, thank you for click kudos in my post.
    If your issue has been solved, please mark the post was solved.

  • Podcast on external URL, Please help!

    Hi All
    I have developed a website in iWeb'08, published it to a folder and uploaded it to my own URL. Now what I want to do is add a podcast, but I suspect that this is only possible with .mac! My own hosting company does have php support, so how can integrated the RSS stuff into the site. I imagine I have to get out text edit and do some surgery on the html file, not an issue if I knew what to do or be looking for.
    Thanks

    Sorry but here is another update. I now have the subscribe button working so that the rss feed functions. This required some editing of html and xml files. The good news a site created with iWeb'08, with a podcast, and rss feeds, hosted on a URL other than .mac can function! All that is missing is the media file, ie the m4v or mp3 file. when I browse to it in I get the QT logo and question mark.
    If any one has a work around for this, then please let me know.

  • 6120 won't send message - please help!

    I've had my 6120 for about 3 months now. Been working fine for the whole time until today when i tried to send a message. Was stuck in my outbox for a while until is comes up with and error, something like:
    'General Error: Memory Full; close applications and try again'
    I've tried everything i can think of but nothing seems to be working to fix this problem. I can make calls and recieve message fine; but no sending message which is what i mainly use the phone for.
    Any help or guidance would be greatly appreciated!
    Cheers

    I've tried everything i can think of
    such as????
    Would that include deleting old messages, clearing logs and removing large music files/images and all the things you have done in 3 months. I am not saying remove them all but a little housekeeping may release some memory. Worth a try perhaps.
    I would love to know what you have tried
    6120c (3uk) and 6300 (Orange), LD-3W

  • Mail refuses to send messages--please help

    Hello all,
    I am running system 10.8.2 on a newish iMac.  For the second or third time in recent months, Mail can't send any mail, although it can receive mail.  The message I get when trying to send a message is:
    "The STMP connection to server "mail.optonline.net" failed.
    Select a different outgoing mail server from the list below [note--all optonline.net] or click Try Later to leave the message in your Outbox until it can be sent."
    I had not changed anything about my accounts when this happened--no password change, no changes to my settings.  I have restarted the computer to no avail.  I know the SMTP settings are right, because I can send mail from my older MacBook Pro on the same home network.  When this has happened before, it has resolved itself in a day or two.  This time it has been four days and counting.  I tried creating a new account, and that doesn't work either. 
    Any thoughts?  Thanks in advance for your help!

    The SMTP settings are pertinent to the individual computer that they are set on, not on the network.  So you could have the SMTP settings correct on your older MacBook Pro, but they coud still have changed and be wrong on your iMac.  I would double check them on your iMac.  In Mail "Preferences click on the drop down arrow at the right end of the line "Outgoing Mail Server (SMTP):".  Especially note the settings in the window  resulting from clicking on "Edit the SMTP Server List",  box shown below:
    Message was edited by: Radiation Mac

  • Terminal Command is not allowing me to send mail - please help

    I (foolishly) entered these two commands based on this article to try to receive read receipts and now I cannot send any mail at all (http://email.about.com/od/macosxmailtips/qt/etrequestrecp.htm)
    defaults read com.apple.mail UserHeaders
    defaults write com.apple.mail UserHeaders '{"Disposition-Notification-To" = "Name <email@address>"; }'
    I did try the command in the article to undo this command, but it's not working. Any help would be appreciated - thanks

    Hi Christine, and a warm welcome to the forums!
    Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup), it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    If that doesn't do it and you can afford to redo all your Rules, try these & reboot...
    /Users/YourUserName/Library/Mail/MessageRules.plist
    /Users/YourUserName/Library/Mail/MessageRules.plist.backup

  • I think a firewall is interfering with my mail program - I can receive but not send. Please help!

    I think Firefox may have installed a firewall that is interfering with my email program - I can receive but not send mail.
    == This happened ==
    Not sure how often
    == Firefox updated with ALOT

    Firefox does not install a firewall.

  • Cut off from server cant send emails please help

    using thunderbird I cannot se.d emails .I keep getting asked for a new password ,to no avail .Iam told Iam cut
    off from the server.How to retrieve the situation is the question

    To diagnose problems with Thunderbird, try one of the following:
    *Restart Thunderbird with add-ons disabled (Thunderbird Safe Mode). On the Help menu, click on "Restart with Add-ons Disabled". If Thunderbird works like normal, there is an Add-on or Theme interfering with normal operations. You will need to re-enable add-ons one at a time until you locate the offender.
    *Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

Maybe you are looking for

  • A Very New and Cool Suggestion for a *PLAIN TASKBAR*

    Hello, I have a very different kind of suggestion for the TASK BAR. I was listening to songs when a video song came, the video was playing in the background.. i didn't realize that , when i saw the task bar, i liked the way how the transparent task b

  • Workflow Error  --  Error' 9' when calling service ' SO_OBJECT_SEND'

    Hi , Could  you  pls tell me what will be the reason for this Error' 9' when calling service ' SO_OBJECT_SEND' Thanks & Regards, Gopal

  • Validation Related

    hiiiiii version-Application Express 4.0.2.00.06 Os-microsoft window server 2003 Browser-Mozilla firebox 3.6.17 Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64 bit production i have P6_name text field item,which contain the name of applica

  • Config.getInitParameter dosn't work on Tomcat 3.2

    I've defined parameters in Web.xml of my application which a Servlet can read OK, but a JSP in the same application just gets a null when calling getInitParameter() Any ideas? [email protected]

  • Hyperlink event handleor

    How to create a HyperLink Event handler. Such as HyperLink_Action(), to it work.