Results 1 to 2 of 2
  1. #1
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default information from a textfields

    I have a jsp page with two text fields named username and password. When the user clicks the submit button i need to perform a check if the password and username provided are correct
    how can I read this information from the textfields?

    Thanks

  2. #2
    Revelation is offline Member
    Join Date
    Jun 2007
    Posts
    6
    Rep Power
    0

    Default

    It depends on what kind of object the text field is, but if you look up the class it comes from you should be able to see what interfaces it has.

    As an example, you might have created the text box like the following
    jTextBox usertext;
    jTextBox passtext;

    then, to retrieve that information, in your button function code you would have something like
    checkUser(usertext.getText(), passtext.getText());

    Like I said, check the available class interfaces. there should be something similar to getText().

    EDIT: checkUser(string username, string password) would be what my made up checkUser function would accept.

Similar Threads

  1. system information
    By nitinborge5 in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 09:25 AM
  2. how to get information of a file
    By leonard in forum New To Java
    Replies: 2
    Last Post: 08-01-2007, 05:03 PM
  3. Information about Struts
    By Felissa in forum Web Frameworks
    Replies: 2
    Last Post: 07-02-2007, 04:40 PM
  4. Some information about Hibernate
    By Marcus in forum JDBC
    Replies: 2
    Last Post: 07-02-2007, 04:26 PM
  5. Some information about spring
    By Albert in forum Web Frameworks
    Replies: 2
    Last Post: 07-02-2007, 04:08 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
  •