简体   繁体   中英

How to prevent Liferay modify my web.xml?

I am migrating a Liferay 5.x site to 6.1GA2. My problem is that Liferay 6.1 modifies the web.xml of a deployed app that is basically a web service implementation.

It changes the <listeners> definitions which is problematic because there are some Spring-magic involved and the ContextLoaderListener is not initialized correctly.

Is there any way to convince Liferay to leave my web.xml untouched? I have already debugged the BaseDeployer.updateWebXml() method that does the magic but as I see there is no option to do that. I found a few bug tickets in the ticketing system with similar issues but it seems the latest patched version of the file still does not support this feature.

Any hints?

The changes in web.xml are required for webapps that Liferay is interacting with. It appears when you deploy your webapplication through Liferay's ${liferay.home}/deploy folder. If you have a webapp that's unrelated to Liferay and does not need this, you can just deploy it directly to your appserver, without going through Liferay's deploy folder.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM