Render HTML conditionally in Spring MVC

前端 未结 3 946
不思量自难忘°
不思量自难忘° 2021-01-14 05:46

Is there any tag which lets to render the HTML blocks conditionally. For e.g.: Struts has:

         


        
3条回答
  •  悲哀的现实
    2021-01-14 06:27

    you could use the common JSP/JSTL taglibs

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    
    
            
                something
            
            
                something else
            
        
    

    alternatively

    
            something
        
    

    using c:if there is no else condition as far as i know

提交回复
热议问题