HttpServletRequest的常用的獲取參數(shù)的方法有如下:
getParameter(String?name)
getParameterMap()? ?返回所有參數(shù)的k-v?Map<String,String[]>
getParameterNames()? ?返回類型?Enumeration<String>
getParameterValues(String?name) 參數(shù)有多個值返回數(shù)組String[]
getReader() 參數(shù)是流形式的(圖片文件),可以用來創(chuàng)建JsonReader(javax.json.JsonReader;)
JsonReader reader = Json.create(request.getReader())
Json相關(guān)內(nèi)容:
JsonReader對應(yīng)JsonWriter
JsonWriter out = Json.createWriter(resp.getWriter())膨蛮;功能類似PrintWriter
out.write(JsonStructure?arg0) json格式的輸出
PrintWriter out = resp.getWriter()谦趣,可以輸出String,char
javax.json.Json
javax.json.JsonObjectBuilder------build----->javax.json.JsonObject
javax.json.JsonArrayBuilder? -----build------>javax.json.JsonArray;