开发者

Java Text Area not posting

开发者 https://www.devze.com 2022-12-08 07:21 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消