Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Struts 2 Web Application Development and Ajax

 
Felix Sima
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Dave.

Is there any support for Ajax in Struts 2?
How easy is to integrate Ajax in Strut2 2?
Thanks.

Felix
Use www.jaaava.com - A Google CSE for Java !!!
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

There are lots of alternative for Simple.


You can use Web parts , JQuery , DWR for AJAX in your Struts 2 application.

This are easy to use and understand.


Thanks,
Nishan Patel.
 
Shahzad Masud
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax is a simple concept & way to code for a problem. It is nothing to do with frameworks. I believe, you were trying to ask if there is any available feature in Struts 2 framework for handling AJAX related operation. I am not familiar with any.
 
Felix Sima
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I read that the Struts 2 uses DOJO toolkit to add AJAX capabilities to JSP. Is it right?
I'm acquainted with JQuery and I would like to use it instead of DOJO if possible.
Thanks.

Best regards,
Felix
Use www.jaaava.com - A Google CSE for Java !!!
 
Yohan Liyanage
Ranch Hand
Posts: 132
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 has built in support for Ajax.

In Struts 2, there's a concept called "themes". Themes determine the appearance and behaviour of controls (rendered by Struts 2, through struts tag library). There are three standard themes in Struts 2, namely simple, xhtml and ajax.

To enable Ajax based posting of forms , all that is necessary is to use the "ajax" theme. For example:



It internally uses Dojo for Ajax communications.
[ November 11, 2008: Message edited by: Yohan Liyanage ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic