-
1. Re: Wildfly 8.2 standalone deploy war question
jaikiran Jun 3, 2015 8:24 AM (in response to jj83)What does your code to read the xml file look like?
-
2. Re: Wildfly 8.2 standalone deploy war question
jj83 Jun 3, 2015 11:29 AM (in response to jaikiran)Hello Pai.
I spend 3 hrs to search for solutions, it is appear wildfly generate a vfs (virtual file system) on the fly when deploy the apps. So for anyone have same issue, this is a working code that I have a slightly change to return InputStream.
URL url = Thread.currentThread().getContextClassLoader().getResource(xmlLocation); (This is NOT working code, complain not found FileNotFound exception xml)
InputStream xmlStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(xmlLocation); (this is working code, return xmlStream and then I use jax-rs to post the input stream instead of using url.getPath() where it failed)
Response response = webTarget.request().post(Entity.entity(xmlStream,MediaType.APPLICATION_XML));
thanks
-
3. Re: Wildfly 8.2 standalone deploy war question
jaikiran Jun 3, 2015 11:33 AM (in response to jj83)Using the InputStream is the right way to deal with resources that are part of your deployment. So what you did is the correct change.
-
4. Re: Wildfly 8.2 standalone deploy war question
subaochen Dec 13, 2015 8:53 PM (in response to jj83)I also wondered why wildfly-maven-plugin deploy my war to standalone/data/content directory other than standalone/deployments ? and how to configure wildfly-maven-plugin that can deploy my war file to standalone/deployments?
Thanks in advance!