*
The moose likes Struts and the fly likes Populate Field From Database onblur Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Populate Field From Database onblur" Watch "Populate Field From Database onblur" New topic
Author

Populate Field From Database onblur

ankit mahajan
Greenhorn

Joined: Jul 30, 2013
Posts: 7

I have Two fields userid and name in database.

I want that when user enters userid and presses tab then name should be fetched from the database and the textfield should be populated.

can anyone tell me how it can be done in struts 2.

I was able to do it with ajax in jsp and servlets.

but i dont know how to do it in struts.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Struts is built on top of jsp and servlets so you can use the same techniques.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Populate Field From Database onblur
 
Similar Threads
Want to Create a user Registeration Form using Struts 1.3 framework
treeview from database
How to retrieve the Data using Hibernate 3.6 and pass to Model class
Pre-populate form
Struts2 - User ID and Name - Map