You don't need to configure Tiles-Defs.xml, you don't need to add the configuration of Tiles in Struts-Config.xml. You have three JSP files directly in the JSP page. There are three JSP files, three files are in web-inf. Folder tileslist outside folder, Test.jsp, mapping.jsp, lists.jsp1.test.jsp <% @ page contentty = "text / html; charset = UTF-8"%> <% @ taglib URI = " /Web-inf/struts-tiles.tld "prefix =" tiles "%> <% @ Taglib URI = "/ Web-INF /struts-tiles.tld "prefix =" tiles "%>
mapping title> head> body> html> 3.lists.jsp <% @ Page ContentType = "Text / html; charSet = UTF-8"%>
lists title> head> jbuilder generated jsp h1> body> < / html> Test.jsp is equal to the configuration file, mapping can be introduced into the configured page, such as DD, list is a point introduced in mapping, you must pay attention to the Test.jsp as the home page, but actually The display is mapping, layout the introduced file in mapping. Test is just a template.