• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to integrate AJAX with Struts in a large Application

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic