pass java variable in jsp:param

后端 未结 5 1751
耶瑟儿~
耶瑟儿~ 2021-02-04 03:37
 <%!  
    String str = \"prerna\";  
  %>  

 
       >
               


        
5条回答
  •  忘掉有多难
    2021-02-04 03:58

    Request parameters can be passed by using
    One can pass the parameter names and values to the forwarded file by using a tag

    Sample e.g :

    HTML :

    
    
    
    
    
    
      
      
    
    
       
    

    tag is used to pass the name and values to the targeted file. These parameters will be retrieved by the targeted file by using request.getParameter() method. In this way one can pass and retrieve the parameters.

    This page had a parameter forwarded to it:
    Name: <%= request.getParameter("myParam") %>
    Age: <%= request.getParameter("Age") %>

提交回复
热议问题