How can my java application fill out an online form

Hi,
I am trying to create a Java application that will connect to a URL, fill out the form and submit it.
How would I go about doing this?
Thanks in advance,
Chanie

I'm doing something exceedingly similar, but I'm not sure how to get it to work, to be honest. Basically, I'm trying to download information from a site that requires a username and password. The html of the site is as follows, as well as my code. Any help would be appreciated!
<form method="post" action="/cards/FALLON19790309A.php">
<p>Username:   <input type="text" name="username" size="16" maxlength="16" value=></p>
<p>Password:   <input type="password" name="password" size="16" maxlength="16"></p>
<input type="hidden" name="action" value="muffinklezmer">
<input type="hidden" name="nocache" value="1046986423">
<input type="submit" value="Log in"></form>
My code right now looks like this:
URL playerCard = new URL("http://www.webpage.com");
URLConnection pcConnection= playerCard.openConnection();     
pcConnection.setRequestProperty("username","ABCDE");
pcConnection.setRequestProperty("password","12345");
BufferedReader in = new BufferedReader(
new InputStreamReader(
pcConnection.getInputStream()));
pcConnection.connect();
String inputLine = in.readLine();
while (inputLine != null)
System.out.println(inputLine);
inputLine = in.readLine();
}

Similar Messages

  • How can I open and fill out a Secured Adobe PDF job application?

    How can I open and fill out a Secured Adobe PDF job application?

    Hi margueritew68053277,
    You should be able to fill that out using the free Adobe Reader, or Adobe Fill & Sign.
    Best,
    Sara

  • Trying to fill out an online form but can't click on anything

    Trying to fill out an online form but can't click on anyhting

    Quit your browser then relaunch and try again.

  • I fill out a online form and when i hit send firefox resets the page

    When i fill out an online form of some kind and it takes over a certain amount of time firefox will clear all my information and reset the form to all blank responses. I assume it must be firefox and not the website I'm using because it has happened on multiple occasions on multiple websites.

    Go to the address '''about:crashes''' and tell us your latest crash IDs. We can then look at the data specific to your crash and have a better idea of what is causing the problem.

  • I was filling out unemployment applications on my HTC desire when I lost my page somehow. how can I retrieve the filled out pages so I don't have to start all over again from the beginning. please help

    the application I was filling out on line DISAPEARED. how can I find it? I was on FireFox

    Hi Little K-
    This explains how: Mac OS X: Changing or resetting an account password
    Luck-
    -DP

  • How can my java application get its own PID?

    My java application runs under AIX?
    The application needs to get its own PID.
    There is a possibility to get it by
    Runtime.exec("ps -ef | grep <user.name>");
    But is there any other alternate possibility?
    Any idea would be great appreciated
    kind regards

    Hello! I found several ways for this in a blog from someone called Igor Minar on
    http://net3x.blogspot.com/2007/03/how-java-application-can-discover-its.html
    He found several ways:
    * Use Java management and monitoring API
    ManagementFactory.getRuntimeMXBean().getName();returns something like
    1826@localhost
    where 1826 is the PID of the JVM process, i.e. my application's process. But this hack is JVM dependent and may not work on JVM's other than Sun's
    * Use a shell script to put a property in place that is set to the PID:
    exec java -Dpid=$$ -jar myapp.jar* Java Native Interface - cumbersome and platform dependent solution
    * Use procfs (Linux solution: read /proc/self, nifty nifty, posted in the comments of the resp. post!)
    int pid = Integer.parseInt( ( new File("/proc/self")).getCanonicalFile().getName() );* From another comment: Reflection will work (on Unix): The Process class has a field called pid which can be queried:
    static int getPID(Process process) throws IllegalAccessException, IllegalArgumentException,
                                                                      NoSuchFieldException, SecurityException
         Field field = process.getClass().getDeclaredField("pid");
         field.setAccessible(true);
         return field.getInt(process);
    }But this solution looks a bit of a kludge to me. I think the /proc/self solution is best - it definitely rox my sox!
    Hope this helps!

  • How can my java application change unix password?

    Hi all,
    Is there any one knows how to change the Unix password from an application? How can i give commands to the shell?
    Thanks

    How can i write a progaram that takes my (old pass,new pass,confirm pass) and change the unix password

  • How can I stop partially filled out "Contact Us" websites from disappearing

    If I want to contact a supplier to complain about a problem with his goods, on his website I find a form "Contact Us". This form usually has mandatory lines for my name, e-mail, address, phone number, etc.which must be filled out. Then the subject matter is supposed to be typed up in the space provided on the Form.
    Many times such a Form suddenly disappears from the screen, before my typing is complete. Some of such disappearances are triggered by hitting the "Return" on the keyboard, when I want to start a paragraph. Obviously such a website is set up to understand this button only as "Enter" (because there is no proper "SENT" button) and thus sends the form up line uncompleted.
    In any case, it suddenly disappears from my computer. The recipient will have no idea what the incomplete form is really about, and thus will not respond. What is really troubling is that when I go to my FF History and reload the form, or reload from the back-button, the form will only re-appear totally empty, and all my previous typing on the same form is lost.
    Is there a way to set FF Preferences to prevent the disappearance of the completed content?
    If not, there should be, both to stop the whole thing from happening over and over again, and secondly to provide an e-mail like record of what comment was sent by me.
    MacbookAir/Mac 10.8.3/ Firefox 21.0

    As long as a text area has focus then the Enter key should add a new line.<br />
    If you are in a single line input field then the Enter key will submit the form.
    It is best to use the Tab key to move to the next field when filling a form.
    * https://support.mozilla.org/kb/Pressing+Tab+key+does+not+select+menus+or+buttons#os=mac
    * http://kb.mozillazine.org/accessibility.tabfocus

  • How can I integrate a "fill in your name form" on my iWeb site ?

    Hello,
    I am looking for a contact page in the iweb. A contact sheet where I can have my clients fill in theirs name,adress and e-mail adress and leave a comment. Is there one ? or how can I easily create one ?
    Please let me know ,
    friendly yours
    gunilla in paris
    MacBook   Mac OS X (10.4.10)  

    http://www.varkgirl.com/Varkgirl/Add%20forms.html
    if you want the info emailed to you
    or
    http://www.varkgirl.com/Varkgirl/Popup%20Guest%20Book.html
    if you want it to show up like a guestbook
    or
    http://js-kit.com/comments/
    for a different option that shows up directly on the page
    You can add just about any type of html code, widget, or add-on to your iWeb site if you are willing to do a little post-publish editing.
    Basic Instructions are here:
    http://iweb.varkgirl.com
    (Click on the first "tip" link in the list)
    Disclaimer: My website contains various ads, so if you click them while visiting my site, I will receive financial compensation, which I use for materials for my classroom.

  • How can a user save more than one online form without losing their previous form?

    We use Adobe FormsCentral for parent, student and faculty response at my school. The number one task we use them for is Progress Reports. Faculty members fill these out for EVERY student that they teach at our school. Many faculty members like to start the forms and return at a later time to finish them. So this year we were excited to offer the option of saving, however many faculty members have reached out with concern that they save one, receive the link, start a second form, click save receive the link and the first form is gone. I was under the impression that every SAVED form is a case-specific link.
    Is there a way to make saving multiple forms possible? I know that it would be best to just tell faculty to do their form and submit it however that is not the answer they are willing to accept.
    Additionally, because of the PDF not working the same on all machines due to people not necessarily updating their adobe software, that is not an ideal option.
    Thank you in advance.

    What you've described should work fine, assuming the user uses the original forms URL each time they start a new process.
    You send the form URL to the users:
    1) Faculty gets the form URL and starts filling it out
    2) Faculty clicks "Save", enters email and is sent a unique link to that saved form data
    3) Faculty starts the form over, using the original URL (not the link in the Saved data email)
    4) Faculty saves this second version of the form, entering the same email address in the save dialog
    They now have 2 unique emails that contain unique saved data URLs, either one can be opened and the data for that form will be retrieved, they have the option to continue and if still not complete save again, or to submit the form.  The other email/link will retreive the other data set and they have the same options there.  Once they have submitted the data from both of those saved forms there would be two submissions in FormsCentral.
    What error are they getting that says the first form is gone?  And are they definitally starting from the original URL both times and not from a saved URL?
    Thanks,
    Josh

  • Filling out an online form

    Hello all,
    I am looking for opinions please if possible. If you visit a
    website and wish to download/view/print a PDF relating to a
    particular product on the site, would it put you off if you could
    only access the pdf if you fill in your contact details via an
    online form first...?
    Your opinions are appreciated, many thanks and have a good
    day

    "simbull" <[email protected]> wrote in
    message
    news:fi3k5u$7dd$[email protected]..
    > Hello all,
    > I am looking for opinions please if possible. If you
    visit a website and
    > wish
    > to download/view/print a PDF relating to a particular
    product on the site,
    > would it put you off if you could only access the pdf if
    you fill in your
    > contact details via an online form first...?
    Unless I *really* needed the information badly, no, I
    definitely wouldn't
    fill out the form. For me - and I think for most people -
    it's not a matter
    of the few seconds it would take to fill out the form, but a
    strong dislike
    for having my personal information recorded. (And anyone who
    isn't worrying
    about this probably should be!)
    Patty Ayers | Adobe Community Expert
    www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

  • Does Firefox facilitate my filling out of online forms when the form asks for standard information such as name, address, email, phone number. I just switched over from Goole Chrome which had this feature.

    Google Chrome would offer dropdown prompts for this information as I started entering the information. I would simply highlight the correct prompt and hit enter and the information would be entered throughout the online form.

    See:
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.com/kb/Form+autocomplete
    *Autofill Forms: https://addons.mozilla.org/firefox/addon/autofill-forms/
    *http://autofillforms.mozdev.org/drupal/content/main-page

  • Fill out a pdf form from ADF application

    Hi
    I need to fill out a PDF form, from my ADF application and i want to know if exist a component or libarary to do this.
    i hope you can help me
    Regards.

    Hi,
    two options are:
    Oracle BI Publisher (by far best choice but needs to be licenced)
    http://www.oracle.com/technology/pub/articles/vohra-jdev-xmlpub.html
    Jasper Reports, Free but not as functional or easy to use as BIP
    http://jasperforge.org/projects/jasperreports
    Both products have Java API's which you can integrate with your application.
    Brenden

  • Can we create an Eloqua cookie for a user if we just know his email address and they have not clicked an email link or filled out an Eloqua form?

    Scenario:
    When a visitor comes to our website and creates a login, we are pushing their profile information to Eloqua via the Eloqua web services api. However, because they have not filled out an Eloqua form or clicked through an email, their page visit activity is not synced with their profile information in Eloqua because they don't have an Eloqua cookie yet (for first time visitors only).
    I know you can integrate an external form with an Eloqua form (which will then create the Eloqua cookie automatically) but because this is a login form for our website, we don't want to send secure information (such as passwords) over to Eloqua.
    Is there a way to create the Eloqua cookie using the web services api and/or javascript or is this a missing feature?

    I think what you're asking is how can you link a visitor profile to an Eloqua contact.  An Eloqua cookie is placed on a user's computer by the javascript tracking scripts - this is just a unique id that is used when saving the visitor information to a table in the Eloqua database.  It will be there regardless of whether the user comes from an email or submits a form.  What does happen when a user visits your website from an Eloqua email or submits a form is the visitor profile that has been keeping track of website activity in Eloqua gets linked to an Eloqua contact by email address.
    To make this link happen in your scenario, you can instead of pushing the information through the web services to Eloqua directly as a create contact call, create a form submission through the web services where you can pass through the elqCustomerGUID (the cookie value) along with at least an email address to make the link happen.
    You will need to:
    1. use javascript on your website to pull the elqCustomerGUID from eloqua.  There's code for this in the integration details for individual forms in Eloqua.  It has to be pulled from Eloqua servers because the cookie is a third party cookie.
    2. pass this cookie value to your server so you have it when you make the web services calls to Eloqua to push the contact information over and now make a form submission record (entities through the api Base->Form->*this will be a form submission record*) to create the link in Eloqua.

  • How can I get the best out of my battery life?

    There are a variety of things you can do to extend your device battery life, and use your phone for longer periods of time to see you through the day.
    Set your screen to timeout after a period of inactivity. This way your phone is not sitting idle with the screen backlight consuming extra energy. The recommended screen timeout is 30 seconds, but most phones will allow from 15 seconds to 10 minutes.
    Turn off location services (GPS), Wi-Fi and Bluetooth when not using these functions. When they're on, your phone constantly searches for your current location and open networks, which has a big impact on battery life.
    Turn down the screen brightness. For example, on an iPhone 4 the lowest brightness setting gives roughly 6.5 hours of continuous use, whereas the highest setting gives roughly 3.5 hours. You can always adjust the brightness when you're outside so you can still see your screen clearly. Some devices have an auto-brightness setting, where the phone adjusts the screen brightness depending on the light around it.
    Close your applications. On smartphones, returning to the ‘home' screen only minimises your apps – they keep running in the background. Closing your apps fully will save power; for example, on Samsung Galaxy devices hold down the home button for two seconds to see a list of all open apps. You can then swipe these to the left of the screen to exit them completely. On an Apple product, double press the home button to bring up all active applications and exit from there.

    Re: How can I get the best out of my battery life?
    Hi,
    When I make phone calls people on the other end have difficulty hearing me. They describe as they can hardly hear me as if I was speaking through the pillow etc). I am not touching any buttons and obviously it is not mute. This was happening couple of time in June, then every now and then. Recently it happened a few time in 2 weeks. I was trying to check if it was a reception issue but the place I spoke from is my office I make 70% of phone calls from. Can you book time for me in repair shop and address the issue.
    Thank you.
    Sergey Sinitsyn

Maybe you are looking for