This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hi, I read somewhere that for HTTP POST method, we don't have to do URL encoding because Browser (or ?) will do the automatic encoding before sending the form data. Is it true? Whether all browsers supports this feature. Thanks in advance. SK
Hi, I'm not sure it is the same for all of them but.. My browser's handling of form encoding is seriously crap.When you submit the form data,it is automatically defaulted to iso-8859-1. So when I collect the submitted form data in my jsp/servlet I have to do this... String temp=mybean.getDns1(); temp=new String (mybean.getBytes("ISO-8859-1"),"shift_jis"); Hope this helps!
I'm not sure exactly what you're asking, but "application/x-www-form-urlencoded" is the default encoding for all forms. See here: http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1 All you need to do in the servlet is retrieve the parameters using HttpServletRequest.getParameter(), for POST or GET requests. If you want to upload files, then you need to use a different encoding for the form. Without more detail in the question I can't say much more! --Jase
<a href="http://www.netspade.com/" target="_blank" rel="nofollow">http://www.netspade.com/</a> - Web programming articles and tutorials.
Joined: Jan 02, 2002
Hi, In the form, I am having encoded hidden parameter: <FORM name="testfrm" method="POST"> <input type="hidden" name="hiddenParam" value="test%40host.com"> When my servlet receives the POST request, getParamter still returns the encoded value only instead of decoded value. String value = request.getParameter("hiddenParam"); I am still getting value as "firstname.lastname@example.org" instead of "email@example.com" Thanks in advance. Sam