Any jsp 2.0 implementation throws an error if the tagdir attribute does not have a trailing slash?

The JSP 2.0 specification refers to the tagdir attribute of the taglib directive (JSP.1.10.2):

Indicates that this prefix should be used to identify tag extensions installed in the / WEB-INF / tags / directory or subdirectory. Implicit tag library descriptor. A translation error should occur if the value does not start with / WEB -INF / tags /.

As you can see, it must have a trailing slash, "/ WEB-INF / tags" is not enough. It should produce a compilation error!

We had a lot of problems with trailing slash and Eclipse. Eclipse slowed down when editing such jsp files. So we removed the trailing slash, and the eclipse ran again.

Most jsp textbooks and books do not use trailing slashes.

The jsp 2.1 specification no longer needs a slash.

I am wondering if their jsp implementation is their throwing compilation error? Or is it safe to use trailing slash?

+3
source share
1 answer

I don't know about other servlet containers, but with Tomcat I never used anything except /WEB-INF/tags.

0
source

Source: https://habr.com/ru/post/1784926/


All Articles