Results 1 to 2 of 2
  1. #1
    redmoonzer01 is offline Member
    Join Date
    Mar 2008
    Posts
    3
    Rep Power
    0

    Default simulate form type=button press with java application

    I made a website that uses html and javascript to require log in.
    Now i wanted to make a Java application to log in ... instead of using a browser
    with a browser you would enter your name in text field and click Login

    I use HTTPClient Emulating HTML Forms

    now i use NVPair to send the form data for the text field
    but it just sits there

    i am thinking my problem is: I am not pressing the button
    I don't know how to set up a NVPair to simulate the button press

    I use InputStream and BufferedReader to read the page
    When i do that i seem to get the html code sent to me

    When you log in you get to a page that says you are in
    If i get the html code that says YOUAREIN i would know it worked

    but i am only getting the html code for the login page

    so i am thinking i am just filling out the form and not submitting it

  2. #2
    redmoonzer01 is offline Member
    Join Date
    Mar 2008
    Posts
    3
    Rep Power
    0

    Default

    ok now i am using apache HttpClient

    i am getting same results

    i submit the form data
    and get response of null

    they say something about how you need to check cookie to see if logon worked

    but my method of log on is just a html form with javascript that if you log on correct you get directed to a new site
    ... don't think cookies are even involved

    so i was hoping i could send the log on data ... then read the resulting page but what i read is NULL

Similar Threads

  1. Java Control Panel not saving changes when I press OK
    By RebelScum in forum New To Java
    Replies: 0
    Last Post: 03-21-2008, 04:22 PM
  2. Java Search Form
    By djcottrell in forum New To Java
    Replies: 1
    Last Post: 12-28-2007, 07:47 PM
  3. simulate message box
    By pablitohh in forum New To Java
    Replies: 1
    Last Post: 12-05-2007, 04:52 PM
  4. Adding EXIT button on MIDlet form
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-22-2007, 10:13 AM
  5. Press any key to continue/press enter
    By JT4NK3D in forum New To Java
    Replies: 1
    Last Post: 11-17-2007, 09:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •