aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to integrate AJAX with Struts in a large Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to integrate AJAX with Struts in a large Application" Watch "How to integrate AJAX with Struts in a large Application" New topic
Author

How to integrate AJAX with Struts in a large Application

Sachin Paradkar
Greenhorn

Joined: Jul 28, 2004
Posts: 6
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.


SachinParadkar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rashid Darvesh
Ranch Hand

Joined: Feb 13, 2004
Posts: 189
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to integrate AJAX with Struts in a large Application