Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6626191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:51:51+00:00 2026-05-25T21:51:51+00:00

i have 3 TextFields (Vaadin) ( DBName, DBUserName, DBPassword) i want to send the

  • 0

i have 3 TextFields (Vaadin) ( DBName, DBUserName, DBPassword) i want to send the typed in text from a portlet to a servlet , this is what i’ve got so far :

Portlet part:

TextField DBName;
TextField DBUserName;
TextField DBPassword;

DBName = new TextField("Enter DB Name");
DBName.setColumns(20);
DBUserName = new TextField("Enter UserName");
DBUserName.setColumns(20);
DBPassword = new TextField("Enter Password");
DBPassword.setColumns(20);
     //Button
    if(event.getSource()== Connect){
        Resource newPictureResource = new ExternalResource("http://localhost:8888/portlet/picture?UserName="+DBUserName.getValue()+"&DBPassword="+DBPassword.getValue()+"&DBName="+DBName.getValue());
        picture.setSource(newPictureResource);
        editContent.addComponent(picture);
    }

Servlet part :

no ideas here , was thinkig about

    String UserName = request.getParameter("DBUserName");
    String Password = request.getParameter("DBPassword");
    String DataBase = request.getParameter("DBName");

I want to get the Values that has been entered to the text field,
any ideas ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:51:51+00:00Added an answer on May 25, 2026 at 9:51 pm

    Your code almost looks finished. I only edited it a little bit (I wasn’t sure what your actual problem was). You could simply use java’s built in support for posting data. You can read more about querystrings in the vaadin book.

        TextField DBName;
        TextField DBUserName;
        TextField DBPassword;
    
        DBName = new TextField("Enter DB Name");
        DBName.setColumns(20);
        DBUserName = new TextField("Enter UserName");
        DBUserName.setColumns(20);
        DBPassword = new TextField("Enter Password");
        DBPassword.setColumns(20);
    
        Button b = new Button("Connect");
        b.setImmediate(true);
        b.addListener(new ClickListener() {
    
            @Override
            public void buttonClick(ClickEvent event) {
                // post form values using java url connection
    
    
            }
        })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some textfields and I want to do when I change textfield1 text
I want to have a Form that can Add or Delete TextFields. I was
i have few textfields in my php form. i want to handle the keypress
I have a question concerning the TextField of Vaadin. I want to block input
I have a 3 text fields and a button. I want to press on
I'm using Vaadin and have a set of textfields in a form. The textfields
I have 4 textfields in a screen. Consider all textfields have some text in
I want to create a form in which i have some textfields and a
I have many textfields that show instruction text within the textbox (how the default
I have several textfields which will populate a text area. I managed to populate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.