Reputation: 1186
may i know if i can change the name of WEB-INF folder in any tomcat webapp. If no, then why as there is context.xml file in tomcat conf folder which contain the path of watchedresource. I tried renaming it but it doesn't work. Can you please tell me what is the reason to provide <WatchedResource>newWebInf/web.xml</WatchedResource>
this tag in context.xml file if renaming is just not working. Or is there any other way to rename WEB-INF folder.
PS: I dont have any requirment related to this. I am just trying out the things. Please don't answer why and where you want this.
Thanks a lot.
Upvotes: 3
Views: 2138
Reputation: 1108722
No, you can't rename the WEB-INF
folder. It's hard specified in the Servlet API specification.
The point of <WatchedResource>
component is to specify the webapp-relative path of a file which Tomcat must monitor for changes in order to auto-reload the entire webapp. This defaults indeed to WEB-INF/web.xml
, but it can also be another file, such as index.jsp
or something else. The whole point is not that you can rename the WEB-INF/web.xml
, but that you can specify a different file to monitor for changes.
Upvotes: 7