• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

retrofitting AJAX into Struts application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you tell me what would be involved in retrofitting AJAX logic into a Struts application?

If you use AJAX, is there still an advantage to making a new application into a Struts one?

Thanks,
LauraB
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can you tell me what would be involved in retrofitting AJAX logic into a Struts application?

If you use AJAX, is there still an advantage to making a new application into a Struts one?



Struts and AJAX are different technologies to solve different problems. One does not replace the other. AJAX is a client-side "add on" (so to speak) that you can use to improve the user interface. Struts is the good old server-side MVC framework that you're already familiar with.

The two can co-exist (in fact, the combination works very well together!). You can improve the user-interface of a struts application by using AJAX technology.
 
Sheriff
Posts: 67754
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
"Laura B.",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
L Bachdot
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Sheriff!

I have altered my profile to reflect my name, per your rules.

L Bachdot
 
Author
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I recently posted to a similar thread:


Hello,

Struts actually works very well with Ajax techniques, as long as you play by Struts' rules.

Struts will automatically populate an ActionForm from the query appended to an Ajax request. For example, if the URL of your Ajax request is ajaxRequest.do, you can append a query string like this:

ajaxRequest.do?parm1=hello&parm2=goodbye

If you have an ActionForm with properties parm1 and parm2, they will be automatically populated with the values hello and goodbye, respectively. The Action can then process the request normally and then return a response.

The Taconite framework (taconite.sf.net) integrates very well with Struts because it will automatically build the query string for you.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic