Retrieving cookies when logging into java forums through a java application

Hello --
I am currently working on a spider application that will have the ability to login to sites of interest and then begin crawling.
I thought an easy place to start would be to login to java forums. However, I have run into a bit of a snag with all of the cookies....
The following is the information that I am posting:
action = "login"
url = "http://forum.java.sun.com/index.jsp"
UserId     // my username
Password // my password
Submit = "Log in"
AutoLogin = "1"
I am doing this using HttpURLConnection that was created using http://developer.java.sun.com/servlet/SessionServlet as the URL. Then I create an output stream etc:
OutputStream os = huc.getOutputStream();
os.write(sb.toString().getBytes("US-ASCII")); // where sb is a StringBuffer which contains the above information separated with &'s
os.close();
This is when I run into my problem...Next, I try to obtain the session cookies (using the same HttpURLConnection that I posted with) but I am not getting all of the cookies.
As a test, I set my browser to prompt for cookies and I found that when you submit your login information three cookies are set: JDC, JSessionId, and SessionCredentials. Then two more cookies are set JSessionId again and jiveUserLastVisited -- I think these cookies are actually set while getting the http://forum.java.sun.com/index.jsp page. Anyway the only cookies that I get through my program are JSessionId and jiveUserLastVisited.
So to remedy this I tried setting followRedirects to false on my HttpURLConnection (before I perform my post) and then I tried to get the Set-Cookie header immediately following my post. What I found was after calling getFieldHeader() my connection has changed -- when I do a getConnection on my HttpURLConnection the connection has changed to the second page (http://forum.java.sun.com/index.jsp) even with redirects set to false.
I guess my inexperience with web applications has caught up with me. Does anybody have any ideas?
Thanks,
Lisa

Lisa
Did you get any reply on this ?? I am also writing a similar web crawler and i also ran into similar problems.
let me know if you found the solution. thanks.
-P

Similar Messages

  • Using Firefox (and having ZoneAlarm), when logging into my work email (Lotus Notes) through a secure Citrix program, a quesitonmark types as and accented "E". This does not happen when using IE (which I prefer not to use). I have turned off the anti-key

    Using Firefox (and having ZoneAlarm), when logging into my work email (Lotus Notes) through a secure Citrix program, a question mark types as and accented "E". This does not happen when using IE (which I prefer not to use). I have turned off the anti-keylogger in ZA (an old, and no longer successful fix). Can anyone help? I need my question marks at work.
    Thanks!
    PS. my keyboard language is not set to French.
    == This happened ==
    Every time Firefox opened
    == I tried to type a "?" in a work email using remote access.

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[Troubleshooting extensions and themes]]
    Check and tell if its working.
    May not be related to your problem but some of your Firefox Plugins are out-dated
    * Update All your Firefox Plugins -> https://www.mozilla.org/en-US/plugincheck/
    * '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''

  • I keep getting an error message when I try to log into to ExportPDF through my Adobe Reader. "Network error occurred while attempting to sign in". Can anyone help, please?

    I keep getting an error message when I try to log into to ExportPDF through my Adobe Reader. "Network error occurred while attempting to sign in". Can anyone help, please?

    Hi Simon,
    I'm sorry to hear that you're having trouble logging in to ExportPDF via Reader. I've checked your account, and all is well there.
    For starters, please make sure that you have the most current version of Reader installed by choosing Help > Check for Updates.
    If you're still having trouble logging in via Reader, please try logging in to the web interface at https://cloud.acrobat.com.
    Please let us know how it goes.
    Best,
    Sara

  • Get message "You have requested an encrypted page that contains some unencrypted info that can be ready by 3rd party, etc." when logging into AOL. What is this?

    Message occurs when logging into AOL. Lock at bottom of page has a red line through it. I'll close out and attempt to sign-in again. Sometimes it is cleared and sometimes I get the message again.

    I would not trust that on a banking site. If it were just a forum, no problem, but anything unencrypted during banking is suspicious.

  • Not able to log into Java Engine (IR,ID,SLD & RWB) using PISUPER account.

    Dear Experts,
    We have installed SAP PI 7.0 in our landscape. Initially, I think PI will get installed in client 001. I have created a new client 100 and using Note: 940309, We have changed the default client from 001 to 100. In client 100, I have checked in SU01 and found that all PISUPER,PIRWBUSER,etc users got created.
    I am able to log into PI using PISUPER(log on pad), but not into IR,ID,SLD and RWB. Can you please let me know why I am getting authentication failure when I am trying to log into Java Engine with user PISUPER ?

    Hi,
    Java stack communicates with the abap stack through UME. So if you can log into abap just fine but cannot via java, that means either the ume is not configured properly. Open config tool, navigate to 'cluster_data -> server -> cfg -> services' and edit Propertysheet "com.sap.security.core.ume.service". Change Property and make sure "ume.r3.connection.master.user" and "ume.r3.connection.master.client" is correct. Now make sure that ume.r3.connection.master.user user is not locked in abap. Finally if ume.r3.connection.master.user is not locked, then ensure that the password is set correctly on ume.r3.connection.master.password.
    Also make sure that the gateway is running with problems.
    Hope this helps!

  • Blue screen when logging into windows server 2008 r2

    when logging into windows server 2008 r2, all I have is a blue screen and the mouse. 
    I tried looking for solutions on the internet, then I found a microsoft hotfix "http://support.microsoft.com/kb/2590550" I run the hotfix in command line but it gave me nothing, no error or success messages.
    I tried to reboot but I still have the same problem. 
    Is there any solution to this problem ?? 

    Hi,
    Thank you for posting in Windows Server Forum.
    Did you face this issue during remote session or console session?
    In addition, have you try to change or install any driver\software which cause this problem?
    Have you use any debugging tools from Microsoft to find respective error cause?
    You can refer following article for memory dump.
    How to read the small memory dump file that is created by Windows if a crash occurs
    http://support.microsoft.com/kb/315263/en-us
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Error 5002 When Logging Into iTunes Store

    A few years back, I had a different email and a different AppleID; I still listen to the music that I purchased under that account, and I need to authorize my laptop now. When I tried to log in (I verified that the password is correct), I get this error:
    "We could not complete you iTunes Store request. An unknown error occurred (5002)"
    However, it doesn't happen when logging into my current iTunes account, or my husband's.
    Anyone else have this issue? Should I just try to contact Apple Support directly to resolve?

    I'm also getting this error. The only thing that is different is that I synced my iPhone to my MBP after several weeks.
    I tried updating one of my free iPhone apps but I was told there was an error in downloading the information. I figured it was because I had moved and changed my address for my credit card but had not updated it on my iTunes account. When trying to go into my account through iTunes I got the Error 5002... I guess I'm not the only person to have this problem.
    Any help would be great.

  • I cannot log into Adobe Reader through my iphone using the Adobe ID and password which work on the w

    I cannot log into Adobe Reader through my iphone using the Adobe ID and password which work on the website.

    Hi Will,
    That's great that you could sign in now.
    I think issue you faced in signing was because email verification was not done before. And when you signed from web client, you might have received a note asking you to do verification. It solved the logging issues you were facing on iPhone as well.
    -Charu

  • HT5622 Why can I not log into candy crush through Facebook ?

    I cleared my cookies and changed my password for Facebook and now cannot get logged into candy crush through Facebook ?

    Hello Butlers babe,
    Thanks for using Apple Support Communities.
    To troubleshoot apps downloaded from the App Store please see the following support article:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    http://support.apple.com/kb/TS1702
    Take care,
    Alex H.

  • How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID promts the previously used email user IDs... Want to disable this feature---How can ot be done ?

    Question
    How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID prompts the previously used email user IDs... Want to disable this feature---How can it be done ?

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * Tools > Options > Privacy > History: "Remember search and form history"
    * https://support.mozilla.com/kb/Remembering+passwords
    * https://support.mozilla.com/kb/Form+autocomplete

  • When logging into iCloud in Safari, Calendar doesn't display any events. They are displayed on the iPad, iPhone on even the iCal. What is wrong ?

    When logging into iCloud in Safari, Calendar doesn't display any events. They are displayed on the iPad, iPhone on even the iCal. What is wrong ?

    :S,
    Sorry, missed that fact. My memory is good, but short.
    Try moving the "Calendar Cache" file to your Desktop. Quit iCal, and find the "Calendar Cache" file in your Macintosh HD/Users/yourusername/Library/Calendars. Move that file to your Desktop. After that, (I remember that I recommended this before), as long as you are moving files to the Desktop, repeat the plist removal procedure once again, log out/in or restart.
    You should also consider removing the "To Do's" from Mail before restarting iCal. When you open iCal turn off "Show Birthdays calendar" in iCal>Preferences...>General.
    Are you syncing any data? If so, what method(s) are you using?
    ;~)

  • When logging into my work webmail, my mac displays tons of blue boxes with question marks in them

    when logging into my work webmail, my mac displays tons of blue question marks - can anybody help?

    Is it happening only with that one site?

  • Why does the apps store not accept my ID and password, it works fine to log into this forum and it works for the apple store, but not to log in to buy apps, it just keeps telling me that the id or password is wrong, and I know it isn't

    Why does the apps store not accept my ID and password, it works fine to log into this forum and it works for the apple store, but not to log in to buy apps, it just keeps telling me that the id or password is wrong, and I know it isn't

    I Just signed in to find the answer to this too.  I started having the same trouble today.

  • For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop compuHelp

    For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop computer. The wifi unit is  a iinet BOB 2 unit. The other computer works completely fine. The only problem is with this apple iPad? I have rebooted iPad and rebooted BOB 2 wifi unit but this has made on difference to the problem?
    Can anyone suggest any HELP
    Thank You

    For the last 2days I have had the words " No Service" in the top left hand corner of my iPad? This causes intermittent  problems when logging into some  websites and Downloading some emails? I currently run a wifi network of 1 iPad and 1 desktop computer. The wifi unit is  a iinet BOB 2 unit. The other computer works completely fine. The only problem is with this apple iPad? I have rebooted iPad and rebooted BOB 2 wifi unit but this has made on difference to the problem?
    Can anyone suggest any HELP
    Thank You

  • TS3276 I cannot send mail. I have logged into my SP through the internet and have no problem I have tried to rebuild the inbox and it just flashes very fast - to fast to view the activity. The mail doctor shows all green lights.

    I cannot send mail. I have logged into my SP through the internet and have no problem I have tried to rebuild the inbox and it just flashes very fast - to fast to view the activity. The mail doctor shows all green lights. This started after I disabled ICloud. I had to disable ICloud as I was not receiving all my mail.

    I cannot send mail. I have logged into my SP through the internet and have no problem I have tried to rebuild the inbox and it just flashes very fast - to fast to view the activity. The mail doctor shows all green lights. This started after I disabled ICloud. I had to disable ICloud as I was not receiving all my mail.

Maybe you are looking for

  • Template Preview Doesn't show images

    I've created a template but when i go to create a new page from the template the preview doesn't show the images. Here's what i see http://tel3deals.com/pics/contributeproblem.jpg When i give it a name and open it it shows the page with the images. a

  • Return statement at the end of try or after catch blocks

    Hi Can anyone tell me which is the better practice - to put the return statement at the end of try block or after all the catch blocks ie at the end of method. Eg Method A() String str; try{ str= [some code] return str catch(Exception e) System.out.p

  • Using multi listbox

    How can i use multilist box in order to fetch parameters from user ex selection-screen begin of block blk1. parameter :   s_maktx like makt-maktx,               p_maktx(18),               s_werks like mard-werks,               s_lgort like mard-lgort

  • Datapump and table privileges

    I am doing an export and import with the DBMS_DATAPUMP api. I am doing a SCHEMA version. Do explicit table grants get included in the dump file. After I import the SCHEMA back into the database I have to regrant execute on DBMS_LOB and DBMS_SQL to my

  • How to see the scrubber bar in Imovie window

    This might sound a little weird, but I don't see the scrubber bar in my Imovie library workscreen--and I don't see any dropdown menu options or icons that would make it visible.  Any thoughts?  Thanks in advance--C