在瀏覽器地址輸入,表示傳入一個參數test,值為123 URL:http://localhost:8888/Test/index.jsp?test=123 <body> ${test} ${requestScope.test} <%request.getAttribute("test"); %> </body> 以上代碼均不能取出值 僅當 使用 <% request.setAttribute("test", "123"); %> 賦值時<body/>內可以正常取出值 那么如何取出URL 中的test 的值呢?如下 <body> ${param.test} <%=request.getParameter("test") %> </body> 均可取出URL中的test的值。。 結論: ${param.name} 等價於 request.getParamter("name"),這兩種方法一般用於服務器從頁面或者客戶端獲取的內容。 ${requestScope.name} 等價於 request.getAttribute("name"),一般是從服務器傳遞結果到頁面,在頁面中取出服務器保存的值。 formData里的數據也是parameter的一部分