开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜