• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to integrate AJAX with Struts in a large Application

 
Sachin Paradkar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I integrate AJAX with Struts in my Application. So as to use AJAX components just like I use my Tag libraries in Struts.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's both a complicated question and an easy one.

It's easy because Struts is primarily concerend with the server side and can co-exist beautifully with Ajax on the client. Whether a request is made to a Struts action or not is pretty irrelevant. The response will still be returned to the client which could care less what gyrations occured on the server in order to compose it.

Where things might get complicated is with the use of Struts custom tags on the pages. Knowing exactly what markup is getting generated from the tags is crucial to being able to manipulate the DOM created by that markup.

Sometimes, all it takes is a simple View Source from the browser to figure such things out.

Not being a fan of Struts, I'm not sure what other interaction issues might arise, but for the most part, I see no reason that Ajax and Struts cannot peacefully co-exist in a web application with just a little bit of care.
 
Rashid Darvesh
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This one example uses a very simple Struts powered backend and a jsp page which uses ajax rendering
http://www.makemyinfo.com/Tutorial.do?action=getTutorial&tutId=T0004.jsp
Rashid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic