• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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: 67750
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
 
Does this tiny ad smell okay to you?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic