-
1. Re: Migration from tomcat to wildfly
jaikiran Sep 6, 2017 2:34 AM (in response to aparna-a-7006b717)Aparna A wrote:
Hi All,
I am migrating my web application from tomcat to wildfly. I was able to deploy the app using a temporary workaround of placing the configurations inside the WEB-INF/web.xml (<context-param>).
I don't consider it a workaround since anything that's needed by the web application as a configuration is supposed to be done that way as per the spec and thus guarantees that it's going to work across servers.
Aparna A wrote:
But I wanted it outside my war file. Is there any equivalent for catalina/conf/localhost/myapplicationconfig.xml in wildfly. Any suggestions please. I tried naming subsytem configuration and also placing it in modules but it didn't work for me.
If you still need it outside of the application, then you could perhaps try deployment overlays as explained here Deployment Overlays - WildFly 10 - Project Documentation Editor . I haven't personally tried it myself so I don't know if it works for this scenario. Even if it works, it's going to be a very application server specific thing.
-
2. Re: Migration from tomcat to wildfly
gir489 Sep 6, 2017 8:58 PM (in response to aparna-a-7006b717)I think what you're referring to is a Wildfly Module? Subsystem configuration - WildFly 10 - Project Documentation Editor
However, the web.xml is the deployment descriptor for any Java EE module that you want deployed. You really should declare your dependencies there instead, as what you were doing before isn't scalable or up to spec. Introduction to Web Application Deployment Descriptors (The Java EE 6 Tutorial, Volume I) I'd advise you to use web.xml as much as possible, because if you decide later you want to go back to Tomcat or another web server, adhering to the EE spec as much as possible with ensure portability.
-
3. Re: Migration from tomcat to wildfly
aparna-a-7006b717 Sep 12, 2017 5:59 AM (in response to gir489)when I was deploying in tomcat the contents were not placed in web.xml instead it was placed in catalina/conf/localhost/myapplicationconfig.xml. So now in wildfly I wanted it in same way instead of web.xml
-
4. Re: Migration from tomcat to wildfly
gir489 Sep 12, 2017 8:11 AM (in response to aparna-a-7006b717)Why? What's the difference?
-
5. Re: Migration from tomcat to wildfly
aparna-a-7006b717 Sep 13, 2017 1:45 AM (in response to gir489)If I place it in web.xml then I need to deploy the application for each environment. So i wanted it outside my package.
-
6. Re: Migration from tomcat to wildfly
jaikiran Sep 13, 2017 2:05 AM (in response to aparna-a-7006b717)Please paste the relevant section from your web.xml that you added to get this working.