Servlet and JSP core programming after reading (Chapter 4)

xiaoxiao2021-04-01  222

Form data processing

1. Read: Request.getParameter () Reads a single charactervalu, getParameterValues ​​() reads multiple values ​​of a single character. getParameterNames () Read all variables above the form. getParameterMap Returns a MAP to store the GetReader read the original form GetInputStream user upload (in jakarta.apache.org/commons/fileupLoad) multi-character set input: setcharacterencoding: 1.String T1 = Request.getParameter ("t1"); string T2 = new string (t1.getbytes (), "shift_jis"); 2.Request.setCharacterencoding ("jisautodetect"); string t2 = request.getParameter ("t1") ;

转载请注明原文地址:https://www.9cbs.com/read-131136.html

New Post(0)