This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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: 9138

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!