spring and apache tiles with shared taglib

2019-07-19 07:34发布

I´m creating spring and apache tiles baserd application. I want to share a taglib in my parts of layout. I`ve added in my layout

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

Now I want to create a foreach loop in the parts of layout but I can`t. When I added this taglib definition in the part of layout it worked. Can I add the taglib only n one place or I need to add it in every jsp file ?

1条回答
做个烂人
2楼-- · 2019-07-19 08:05

You need to add the taglib for each jsp file.

Because tiles works after the jsp files are compiled, and the taglib definition is needed for compiling (the compiler does not know anything about tiles).

查看更多
登录 后发表回答