File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Populate Field From Database onblur" Watch "Populate Field From Database onblur" New topic

Populate Field From Database onblur

ankit mahajan

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

Joined: Oct 29, 2001
Posts: 9168

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

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Populate Field From Database onblur
It's not a secret anymore!