How servlet can populate jsp/html textarea?
Hi, I have been working in this issue for sometime, but have been stuck in this step for a while. I searched a lot in the internet, read many tutorials and question/answers and now I am totally confused! Hence I am asking this question.
I have to develop a html/jsp GUI which will calculate the difference of two XMLs entered in two textareas and the result will be populated in the result textarea. Very much similar to XDiff or KDiff applications. GUI will pass the XML1 and XML2 to servlet and servlet will pass the difference to the GUI. I am stucking at the last step - how servlet will populate the result textarea of the html/jsp?
Also my GUI is multi frames and hence has different source files for each of them. Sample code is as follows -
XML 1:<br />
<textarea name="xml1text" id="comments" style="width:100%;height:95%;background-color:#D0F18F;">
Text Area 1!
XML 2:<br />
<textarea name="xml2text" id="comments" style="width:100%;height:95%;background-color:#D0F18F;">
Text Area 2!
<form action="/servlet/XMLDiffServlet" name="xml3" method="post">
XML 3:<br />
<textarea name="resulttext" id="comments" style="width:100%;height:90%;background-color:#D0F18F;">
<input type="button" value="Clear" />
<input type="hidden" name="text1" />
<input type="hidden" name="text2" />
<form name="xmldiff" method="post">
<frame name="left" src="XML1.html">
<frame name="right" src="XML2.html">
<frame name="bottom" src="XML3.html">
What should I do here so that the result can be thrown in the XML3's result textarea?
If it is not possible in html, is it possible to do the same in jsp? Somebody is saying yes, it's possible in html, somebody is saying no. Sobody is suggesting javabeans and somebody is suggesting ajax. I am totally clueless!
I am sure I have to use req.getRequestDispatcher(), but can it populate the client textarea?
Please help me out.
Re: How servlet can populate jsp/html textarea?