How to show values from property file in JSP in a spring MVC app

后端 未结 5 823
孤街浪徒
孤街浪徒 2020-12-04 20:14

I\'m setting my properties in app-servlet.xml with a bean like this:

    

        
5条回答
  •  隐瞒了意图╮
    2020-12-04 20:59

    
    

    Now this is your Properties File

    site.name=Cool Bananas
    

    And here goes your JSP

    <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
    
      
        <spring:message code="site.name"/>
      
      
      
    
    

提交回复
热议问题