Having problem in HttpClient???

Hi all,
I am not able to login a site using the following code,
can anyone suggest me the right way?
There is no any https connection.
HttpClient client=new HttpClient();
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
String userAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
String connection="Keep-Alive";
PostMethod postMethod = new PostMethod("url");
postMethod.addRequestHeader("User-Agent",userAgent );
postMethod.addRequestHeader("Connection", connection);
HttpConnectionManager connectionManager = client.getHttpConnectionManager();
connectionManager.getParams().setConnectionTimeout(8000);
     NameValuePair[] nameValue =new NameValuePair[3];
     nameValue[0]=new NameValuePair("username","xxxxx");
          nameValue[1]=new NameValuePair("password","xxxxx");
          nameValue[2]=new NameValuePair("submit1","OK");
postMethod.setRequestBody(nameValue);
int status=client.executeMethod(postMethod);
StringTokenizer st1 =
new StringTokenizer(postMethod.getResponseBodyAsString());
regards,
sundar

You need to put the HTTPClient classes in a directory where the jsp can find it. If the classes are in a jar file you could put them in:
webapps/{webapp name}/WEB-INF/lib
Check your server's documentation for details.

Similar Messages

  • Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Having problems with Bridge shutting down after saving photo in PS Cs5,,,,,,,,,  Also when i attempt to update either PS or bridge get an error message in Adobe application manger "Error loading updater workflow"

    Sorry for the late reply. My email firewall has become a little over zealous & sent a lot of my emails straight to my junk email folder, so I have only just now discovered your reply in my junk mail folder.
    The only "don't open files exceeding xxx megabytes" instruction I can find in my Prefs, is in the Bridge Prefs for Thumbnails, & mine is set at 1000mb. The biggest files I handle are bigger than 200mb so I should be able to open a few, not just one.
    However, this doesn't explain why I can open a psd format file of 180mb, close it, but then can't open a RAW format file of only 26mb immediately after.
    I can open the RAW file only if I restart my computer - very annoying!
    However, thanks for the advice about the video card & memory.
    So, I'm still stuck as to what the issue is.

  • Is anyone having problems with the battery heating up and draining the power?  Mine has been doing this for about 2 months now.

    Is anyone having problems with the battery heating up and draining the power?  Mine has been doing this for about 2 months now.

    This is a major problem with Lollipop, but yo said it started 2 months ago.   Several people have fixed problem by removing FaceBook And Face book messenger and then re loading the apps again.   You might want to clear your cache before reloading.  Not sure this is your problem, but worth a try.  Good Luck

  • Hi I am having problems removing mail from trash folder. Can anyone help please

    Hi I am having problems removing mail from trash folder. I can send mails to the folder but cannot delete them permanently from the trash folder. I am using Iphone 3G and anm up to date with OS. Can anyone help please

    Check that there isn't a different Trash folder to the one with the proper Trash symbol on it.
    If you see one in your list of folders rather than a separate one, highlight it, then click on Mailbox...Use this mailbox for...Trash

  • I recently had to swap out my iphone 4s and I am having problems restoring photos and videos from icloud.  I get a message on my phone that says " the URL you are requesting is not found on this server".  Pics and videos have been deleted too.

    I recently had to swap out my iphone 4s and I am having problems restoring photos and videos from icloud.  When I restored my phone from icloud, half of my pics and videos have been deleted, the pics that were restored on my phone are very blurry, and the videos won't play.  I get a message on my phone that says " the URL you are requesting is not found on this server".  I have erased and reset my phone twice, but every time I do it, more pics and videos are deleted.  I have backed up to icloud and iphoto, however, some of the pics are no longer on iphoto either.  Is there someway to get the videos to play on my phone again?  Make the photos not as blurry as they are now and to restore the pics and videos that have been lost?  I really would love to have them back, this phone is supposed to be the best and right now it doesn't seem to be.  Please help if you can.

    I too have noticed that once i restored from iCloud. Pictures blurry and videos wont play!
    Need help too!!

  • Hi I am having problems downloading and updating apps on my iPad and iPhone. The message cycles between waiting and loading then I get an error message saying unable to download app. Eventually,after many attempts it works.

    Hi Guys - for a few days I have been having problems downloading and updating apps on my iPad and iPhone. The message cycles between waiting and downloading then eventually says unable to download app. Sometimes after many attempts it wil eventually work. I tested it on an old iPhone 3G and got the same problem so it is not an iOS 5 issue. My WI-FI connection is working fine. I was wondering if this is an App Store problem? Anyone else in the UK having this problem?

    Hi John
    iTunes Support wasn't of any use to me.
    I have also been having another problem - with BBC iPlayer and other video streaming not working due to insufficient bandwidth, despite my overall download speed being consistently around 50Gb.  This is also affecting AppleTV downloads
    I am using Virgin Media as my ISP, and was wondering whether you do as well.  This might be the common thread.
    -Bernard

  • HT4623 please help - installed IOS7 and now I am having problems playing Words Free on my Iphone.  It gives me a pop up telling me to connect to ITunes but will not connect.  Cannot get out and have to continually shut down my phone and start over.

    please help - installed IOS7 and now I am having problems playing Words Free on my Iphone.  It gives me a pop up telling me to connect to ITunes but will not connect.  Cannot get out and have to continually shut down my phone and start over.

    Hi, jeantwin.
    Thank you for visiting Apple Support Communities.
    The steps in the article below may help you resolve the issue with push notifications.
    iPad and iPod touch: Unable to use YouTube or Push notifications
    http://support.apple.com/kb/ts3305
    If the issue persists, try signing out of your Apple ID and then sign back in.
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311
    Cheers,
    Jason H.

  • I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    I am having problems with creating my apple id. On the phone it is advising me that the ID is not created and then when i do it online it says that it has been created. Can you advise me on what to do please?

    Apple ID FAQ   http://support.apple.com/kb/HE37

  • I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    I am having problems connecting to home wifi.  It was working, but now all I get is a blank white screen.  I re-booted with no success.

    Hi, blank white screen where exactly?
    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    10.5, 10.6, 10.7 & 10.8…
    System Preferences>Network, top of window>Locations>Edit Locations, little plus icon, give it a name.
    10.5.x/10.6.x/10.7.x/10.8.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.
    If using Wifi/Airport...
    Instead of joining your Network from the list, click the WiFi icon at the top, and click join other network. Fill in everything as needed.
    For 10.5/10.6/10.7/10.8, System Preferences>Network, unlock the lock if need be, highlight the Interface you use to connect to Internet, click on the advanced button, click on the DNS tab, click on the little plus icon, then add these numbers...
    208.67.222.222
    208.67.220.220
    (There may be better or faster DNS numbers in your area, but these should be a good test).
    Click OK.

  • HT1657 I am having problems with sound in my rental movies

    We rent movies all the time but lately we are having problems with sound for our movie rentals.  We watch the first half hour without a problem than the voice is choppy all the time.  Sometimes it is good for five minutes than noting for a while.  We  have tried everything we could think of with no avail.  I could see one movie but the last 5 or so have been the same.  Done trying we need to fix this!  Help!  Any ideas?

    First try resetting your iPad by simultaneously pressing and holding the Home and Sleep/Wake buttons until you see the Apple Logo. This can take up to 15 seconds so be patient and don't release the buttons until the logo appears. Try again to see if the problem persists.
    If you still have the same issue, it's possible that something is lodged in the earphone jack. This can cause the iPad to think earphones are plugged in when they are not. Use a vacuum to try to suck any dust, lint or other foreign matter from the jack. If that still doesn't work, try CAREULLY using a toothpick.

  • Hi Can anyone help. I'm having problem with FaceTime on my IPAD .It connects but cuts out Simolarly when someone calls me it connects , then cuts out ThanksBrian

    Hi Having problem with FACETIME on my IPAD Connects to call but then cuts out , similarly calls in connect & cut out Can someone help. Brian

    My ipad is doing the same thing to it won't let me except a incoming call on Facebook and I don't know what to do

  • Having problems connecting a late 2011 Macbook Pro 2.2ghz i7 to a Sony KDL-32L5000 using a display miniport to DVI adapter (DVI to VGA cord). The TV is not detecting the macbook. Anyone have this problem?

    Having problems connecting a late 2011 Macbook Pro 2.2ghz i7 to a Sony KDL-32L5000 using a display miniport to DVI adapter (DVI to VGA cord). The TV is not detecting the macbook. Anyone have this problem?

    You really have to mess with the resoluton, espescially the refresh rate, as it varies from projector to projector, monitor to monitor. Even within the same brand! Because so many manufacturers are trying so many different things to become the next cool kid on the block, and the way the formats are being configured that's now part of the game.
    That's why so many professionally produced corporate shows hire a dedicated projectionist for the video presentations. Too many bugs in the honey.
    Refresh & sesolution are the first things to look at.
    Just so you know that colors in PowerPoint PC, and PowerPoint Mac, don't exactly match... go figure.
    I forgot to mention another thing, sometimes it's the projector that needs to be tweaked.

  • Having problems connecting MacBook Pro 2010 TO vizio 60 " tv

    having problems connecting MacBook Pro 2010 TO vizio 60 " tv using mini displayport to VGA adapter
    non support warning appears pn tv monitor

    However, I still don't get a view of anything on the desktop except for the standard Apple swirl.
    Can you drag windows to the other display?
    In the "Arrangement" tab of "Displays" system preference, you can drag the display pictures to match the actual arrangement, drag the menu bar to the other display, or enable mirroring.

  • I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or atleast maintain the charg over longer periods of time? I have a dc adapter. thanks

    I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or at least maintain the charge over longer periods of time? I have a dc adapter. thanks

    You should be able to use the battery if you get a car type charger which recharges mobile devices.
    The full size iPads use a 10-12W charger, whereas the mini uses a 5W charger. Many car chargers only supply 5W. But at 5W, the car charger should give you some extra time on your iPad. It would be best to use a 10-12W car charger.
     Cheers, Tom

  • Having problems connecting iMac(late 2006) running 10.7.5 to a Samsung Flat Screen TV using separate audio/speaker cable and HDMI standard cable, mini-DVI to HDMI video converter.  TV displays generic Apple galaxy background and "some" windows (e.g. scree

    Not sure that I have selected the correct forum.  Hope my questions are clearly stated.
    Having problems connecting iMac(late 2006) running 10.7.5 to a Samsung Flat Screen TV using separate audio/speaker cable and HDMI standard cable, mini-DVI to HDMI video converter.  TV displays generic Apple galaxy background and "some" windows (e.g. screen resolution choices).   It does not show Mail or Safari menus.  System preferences'  display "gathered" the Samsung and chose its resolution.  I did not find a way to select the Samsung as my display.
    In addition to having old hardware, we have Verizon FIOS providing internet and TV access.  Is there any way to make this work for us?  We would like to stream video (Netflix) and view shows from the Web.  Do we need Apple TV to do this?  Or is it not possible with our old iMac?  My husband thinks that our Airport could be a factor. 
    Thank you

    Lately, I have been seeing a lot of posts with users trying to use their Macs/iMacs to mirror their streaming video from their Macs to an HDTV.
    There are, actually, many alternatives to choose from than just from a Mac.
    You need to have or invest in a WiFi capable router for all of these examples.
    Apple TV only integrates with WiFi and newer Mac hardware. So, if you want to have total integrated experience, if you have a 2011 Mac or newer, you might as well pay the $100 for the AppleTV box.
    If you have a older Mac, like I have noticed many users do, then you have other options.
    If you want to elimate long cable clutter and having your Mac at the mercy of your TV all of the time,  you can still use the AppleTV box independently or purchase cheaper alternative media streaming boxes from Roku, Sony, Boxee or any number of electronics manufacturers that now have media streaming boxes and media streaming capability built into DVD/Blu-ray players.
    These eliminate long cable clutter by being close to the HDTV where shorter, less expensive cables can be used.
    Another alternative for iPad users is to use an iPad with the USB/HDMI video adapter and use your iPad as the streaming box. This ties up your iPad in much the same way as it does with your Mac, but again the iPad can be close to the TV and use minimal cables to the TV.
    Another alternative to is to use a combination of an iPad and your Mac to stream content that is only available to stream online from a computer. In this case, you can use a desktop remote app on your iPad and Mac. A good and cheap Desktop Remote app is Splashtop Remote. This allows you to completely connect your iPad remotely, over Wifi, to your iMac desktop. The app streams both video and sound to the iPad which is still connected to your HDTV. The resultant stream video picture will be smaller than the size of your HDTV, but it will still be plenty large enough to watch. Again, if you own a iPad and an Intel Mac, this method also allows minimal cabling to the TV.

Maybe you are looking for

  • Why is my java applet blank? (Simple)

    I just tried to make an applet with a textbox, a label and a button, but nothing shows up! Here's the code I'm using: import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.*; import java.awt.event.*; public class TestApp

  • Minimum packaging to deploy JAXB?

    What is the minimum set of jars I should ship to deploy XJC-generated classes? I'm trying to decide whether I can use JAXB, and one important factor is deployability. For my project, I can assume that the customer already has Java 1.4, but otherwise

  • Account Lockout source process / application

    Hello There, I am using "Account Lockout Status" and also "Netwrix Account Lockout Examiner" which is really helpful. I have a situation one of the user account is getting locked out everyday i tried to trace the source but in all the cases it shows

  • Combining files, assets, and snippets tabs

    I took apart the files, assets, and snippets sidebar windows from their single tabbed window, but now I want to put them back together. How do I put more than one window on the same tabbed window set?? I see something called "group files with", but i

  • Import folder

    How do I import a folder in the cloud?