Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AJAX with Struts 1.x Version

I am having an application developed with Struts1.3, Jboss4.X version and jdk1.5

Now as an enhancement we are planning to implement AJAX to the web application

Can you please suggest me

  1. Whether I can use AJAX with Struts1.3 Framework?
  2. Which Jar I need to use if I Can implement AJAX?
  3. At Some website, I realised struts2-dojo-plugin.jar can be used for Struts2, whether the same jar works for Struts 1.3 Version

Please clarify my doubts

like image 736
gmhk Avatar asked Feb 26 '10 16:02

gmhk


1 Answers

  1. Yes. You can use AJAX with the struts1.3 framework. AJAX is mostly done in the JavaScript on the client. It requests a URL on your server which will correspond to an action that you write. As far as the browser is concerened it knows nothing about struts, it just happily request pages assuming they are all static html pages.
  2. You do not need any special jar files to use AJAX. In struts2 they included dojo making it simple to use that library without needing extra libraries. However, you can download and install any javascript library such as jQuery, dojo, prototype etc that will help you do AJAX.
  3. Most likely not. the struts2 Dojo integration will not work out of the box in struts1.3 You can use the Dojo library if you wish but you will have to do it yourself.

Some links:

  1. AJAX and Struts1 and Struts2
  2. Justin Coyne
like image 68
Vincent Ramdhanie Avatar answered Sep 25 '22 02:09

Vincent Ramdhanie