struts2 and ajax (Displaying dynamic value in jsp)

Im pretty new to struts2 and Ajax ,Actually i have a drop down menu in JSP lets say first.jsp, When user select a choice from dropdown menu,I am calling a function of Action class lets say Method1.In this method i am fetching some value from DB(lets say:a,b,c) and one value from java memory lets say d.Then I am forwarding to second.jsp and display all the parameters(a,b,c and d) in tabular format.

Now problem is that the parameter d is dynamic ,this is updating by some other application and if its change then I have to show it on JSP wihout any action.

One solution is I use <META HTTP-EQUIV=“Refresh” CONTENT=“10”> in second.jsp , so after interval of 10 second again Mehod1 will call and it will fetch value(a,b,c) from db and updated value of d from java memory. and disply it to second.jsp.But in this case i am unnecessary retrieving value from db while my purpose is just to get value d from memory.This is working but this is causing my application to slower.

Can any body suggetst some other solution? or can i do it using ajax and how?

Any other advice? any help is appreciated.try to be more clear, i’m in lack of ideas in this problem, even it sounds like a classic :I have spend hours trying to play around with this but have got nowhere

Unfortunately, I can not give you sample code but AJAX seems to be the right solution to this. Refreshing the entire page for 1 value is a bit too much. I haven’t used Struts 2 but I’m betting they have a JSP tag library that gives you AJAX functionality. That should be your first approach.

If you find that Struts 2 AJAX is too cumbersome to use then you should consider either prototype or jquery AJAX Framework.

I am sure you can find plenty of real sample code through Google by Searching

Struts 2 AJAX or prototype ajax or jquery ajax