<p>In Ruby on Rails, there's RJS templates that help do AJAX by returning javascript code that will be executed in the client browser. How can I do a similar thing in the Java/J2EE world? Is Google Widget Toolkit similar to RJS? What options do I have? </p>

[{'answer_id': 78711, 'author': 'Alejandro Bologna', 'author_id': 9263, 'author_profile': 'https://Stackoverflow.com/users/9263', 'pm_score': 1, 'selected': False, 'text': '<p>Yes, I think <a href="http://code.google.com/webtoolkit/" rel="nofollow noreferrer">Google Web Toolkit</a> is the java equivalent to RJS templates.</p>\n'}, {'answer_id': 612216, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>There is no direct equivalent. GWT is great if you want to do all or most of the client side in java. Also worth checking out is <a href="http://directwebremoting.org/" rel="nofollow noreferrer">DWR</a>, which gives you remote procedure call style access to your server code.</p>\n'}]
['https://Stackoverflow.com/questions/78590', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/14470/']