pass java variable in jsp:param

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

 
       >
               


        
5条回答
  •  没有蜡笔的小新
    2021-02-04 03:54

    Using request.setAttribute() you can pass the Java variable to the JSP.

     <%  
        String str = "prerna";
    
        request.setAttribute("myVar",str);
      %>  
    
     
          
            
     
    

提交回复
热议问题