?
Solved

Struts and AJAX

Posted on 2006-05-08
7
Medium Priority
?
861 Views
Last Modified: 2013-11-24
Hi Guys,

I have just started to use Ajax with my Struts application. However, I have some problem when I am trying to populating my JSP. I use the set method of the ActionForm but I have no luck. It never set the value of the textbox (html:text) called LoanSought in my JSP.

PS. I follow
http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html

                  log.info("executing execute() of CalculatorAction");
      
                  CalculatorFormBean cfb = (CalculatorFormBean) calcForm;                  
                  
                  cfb.setDate("ddd");
                  cfb.setLoanSought(200);

                  return mapping.findForward("success");


David
0
Comment
Question by:suprapto45
  • 4
  • 2
7 Comments
 
LVL 16

Author Comment

by:suprapto45
ID: 16631687
Must I do it from Javascript? Does anyone has other or better idea?

David
0
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 600 total points
ID: 16632042
Try using DWR.

its real good.

check out

http://getahead.ltd.uk/dwr/

Thank you.
0
 
LVL 16

Author Comment

by:suprapto45
ID: 16635748
Yep,

Thanks shivaspk. Do you have any article that points out on how to use Struts and DWR together?

David
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 600 total points
ID: 16635757
0
 
LVL 16

Author Comment

by:suprapto45
ID: 16636696
The first link does not give a clear explanation on how to integrate both of them (I think that many people have complaint that as well). If you carefully look at the second link, that contains the same link to the URL that I gave before.

So basically I have read both of them. Anything else?

Thanks
David
0
 
LVL 11

Accepted Solution

by:
fargo earned 800 total points
ID: 16637912
AFAIK, There is no direct way of using struts and ajax together with strusts actions and so on...There are certain articles like mentioned above but all are pain...Using DWR is good.

In my opinion, use DWR and call the java classes directly using ajax. No dependency on struts as such. I prefer to have a look at this
http://www-128.ibm.com/developerworks/java/library/j-ajax3/
0
 
LVL 16

Author Comment

by:suprapto45
ID: 16644801
>>"AFAIK, There is no direct way of using struts and ajax together with strusts actions"

Okay, I will find the alternatives then.

Thanks guys.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question