Dear all,
I'm passing a javascript String variable varname in a form inside a jsp to another page.
<form name="form1" action="nextpage.jsp" method="post ">
<input type="hidden" name="varname" value="teste" />
<input type="button" value="button" onClick="document.form1.varname.value = function(window);">
<input type="submit" name="button" value="test1" />
</form>
When I get the String in the next page with:
<%String var=request.getParameter("varname");
%>
However, all the breaklines and whitespaces are gone when the page is displayed!
I tried using the <pre> </pre> tag but no improvements.