问题
Can I reference context parameter in a DD itself?
For instance:
<context-param>
<param-name>firstParam</param-name>
<param-value>/first</param-value>
</context-param>
And then I would like to be able to do something like this:
<servlet-mapping>
<servlet-name>firstServlet</servlet-name>
<url-pattern>${firstParam}</url-pattern>
</servlet_mapping>
回答1:
No , it is not possible. There is no such feature.
来源:https://stackoverflow.com/questions/13575015/can-context-param-be-referenced-inside-web-xml