Sending from android application to java server button defining

view story

http://stackoverflow.com – I'm just developing an android project that scans for bar code and fill the barcode number to text field. I'm just asking to know the exact way to define a button in android application to send this number inserted to the text. The android application will send the data to a java server using the HTTP connection. (HowTos)