posted 11 years ago
Hi Dennis,
I want sample code of Ajax + struts-2 + jsp with the explanation. I've requirement like, I'm Having a JSP page, Contains *User-Info* like name, age, address, country, zip, gender etc., (Using struts-2 and ajax tags). In the same page, I've HTML-Table contains these *User-Info* as headers. When the user clicks on submit button, All the data, what he entered in the form should populate on the Html table in the first row(always, without refreshing the page) and when he clicks on particular row in the table, the information should re-populate on the form( for these two process Action should call but page reload should not). The HTML-table contains maximum of 5 rows. If he entered sixth row, then pagination required. I want to do this in struts 2 - ajax. I'm new to Ajax and jQuery. I'm thinking to do this using ajax(server side), jQuery(client side). But I've no exact vision how to do this. Can you please tell me how to do this.
First thing Still I don't know is, javascript or jQuery really required? or ajax is more than enough?
I did Simple program(not working), In this program, I tried call action without refreshing the page, But I'm not getting. Please guide me.When I click on submit button, the page is getting refreshed.
struts.xml
jsp file
action class: