Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...