Question is pretty lame I know. And the answer is pretty simple – AJAX (I think, I’m not sure).
But before proceeding further, I would like to know if there’s a better way.
My problem:
I have a web application, that takes in one statement from the user, and then in response to it,sends back another statement. The whole process goes on like this.
So how can I give a dynamic nature to my JSP then? If I keep reloading the JSP, my old responses will get deleted. So, that’s not how it works.
I could use RequestDispatcher ‘s include() method. I find that as one solution. So, I can keep including the new pages onto my old JSPs. But again, I think this will have a limitation. Haven’t tested it yet though.
Is there a better way around?
Thanks for your help. 🙂
I’m in love with AJAX consuming Restful Webservices so that is what I would suggest. In addition, if I understand you correctly, I don’t think
include()will help you in this scenario unless you manage to keep streamming your responses in 1 open connection which isn’t really ideal in most Web page scenarios.