html.
??? For overlapping directory mappings, the longest path is
preferred. Thus, if /foo/bar/* and /foo/* were both
url-pattern entries, the first would take precedence for a request
URL of http://host/webAppPrefix/foo/bar/baz.html.
Naming JSP Pages
Because JSP pages get translated into servlets, it is natural to expect that you can
name JSP pages just as you can name servlets. After all, JSP pages might benefit from
initialization parameters, security settings, or custom URLs, just as regular servlets
do. Although it is true that JSP pages are really servlets behind the scenes, there is
one key difference: You don??™t know the actual class name of JSP pages (because the
system picks the name). So, to name JSP pages, you substitute the jsp-file element
for the servlet-class element, as follows:
PageName
/WEB-INF/jspPages/TestPage.jsp
The jsp-file element specifies the location of the JSP page relative to the Web
application root directory. Although anything placed inside of WEB-INF is protected
from direct access, it is the server, not the client, that will be resolving this path, so
you are allowed to specify a location inside WEB-INF.
Generally, JSP pages do not need to be declared inside web.xml. They can be
invoked like any other static resource (e.g., somePage.html), provided you place
them outside of WEB-INF.
Pages:
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88