簡體   English   中英

如何在jsp函數中使用getparameter

[英]How use of getparameter in jsp function

如何在函數中使用getParameter

<%! public void search(){

String name = request.getParameter("name");
}
%>

此代碼接受的錯誤

您不應該在 jsp 上進行任何業務登錄。但要解決您的問題,您可以嘗試以下代碼:

<%!
public void search(HttpServletRequest request) {
       String name = request.getParameter("name");
}

//and while calling this on same jsp
search(request);
%>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM