Java text area is not published
The textarea value I am trying to send is about 400 characters and the value the servlet receives is null. When I limit this to less than 75 characters, the servlet gets the correct value. Has anyone seen this before?
JSP
<form action="/admin/homepageupdates">
<div class="body">
<textarea name="txtcontent" rows="7" cols="105"><%=hp.getBodyText()%></textarea>
</div>
<input type="submit" name="submit" id="submit" value="Update" />
</form>
servlets
String textbody = (String)request.getParameter("txtcontent");
+2
kbrin80
source
to share
1 answer
You should use the method POST
for any large amount of data ( <form ... method="POST">
). The method GET
can only transfer a few bytes depending on how much the browser and web server resolve the URL.
+4
Aaron digulla
source
to share