Can context-param be referenced inside web.xml?

人走茶凉 提交于 2020-01-14 09:33:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!