Java Text Area not posting
The text area va开发者_开发百科lue I am trying to submit is around 400 chars and the value the servlet gets is null. When I limit this down to less that 75 chars the servlet will get the proper value. Has anyone seen this happen 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>
Servlet
String textbody = (String)request.getParameter("txtcontent");
You must use the POST
method for any large amount of data (<form ... method="POST">
) The GET
method can only transfer a few bytes, depending on how much the browser and the web server allow in an URL.
精彩评论