File names for JSP include directive to avoid comp

2020-02-15 01:16发布

I join to project where code duplication in JSP avoided by include JSP directive (static, like #include in C).

Included files follow same naming rules as regular JSP: *.jsp

I worry about this. Do they need another file extension to prevent them from compilation by servlet container (they are just only parts of read JSP pages)?

Or servlet container don't touch files if they don't requested?

If I need to use another file extension how to deal with IDE. I don't want to miss syntax highlighting and completion. In case of Emacs it is easy to workaround, but I don't know how to register file type based on file extension in case of NetBeans.

I am not JSP expert so I read "JSR 267: JSP Tag Library" section "JSP.1.10.3 The include Directive" but didn't find how to resolve my question.

标签: java jsp jboss
1条回答
我欲成王,谁敢阻挡
2楼-- · 2020-02-15 01:52

The appropriate name for such JSP files is .jspf (JSP fragment), as explained in this question.

查看更多
登录 后发表回答