made an application api rest and I need to recover parameters web.xml but not as I am using jboss 7.1
WEB-INF
--lib
--web.xml
You'll need access to the ServletContext
. You can get it in different ways depending on where you want access to the context-param
.
You can then call its getInitParameter(String)
method
ServletContext ctx = ...;
String value = ctx.getInitParameter("your-param-name");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.