Is there any configuration to hot deploy war file AND extract it into a project folder besides the .deployed file so we can modify web.xml, persistence.xml, just like Tomcat and websphere?
Thank you
Related
I am using the simple IntelliJ web project with the default configuration.
I don't see any servlet mapping in the web.xml file:
web.xml file
However, when I run the project in IntelliJ it just works fine:
Project
But when I build it as a war file and deploy it with my tomcat server I can't access the hello-servlet.
Why Local IntelliJ tomcat server works even without proper servlet-mapping on the web.xml file and why it does not work on the tomcat server when I copy the war file into webapps directory.
I'm aware that this is a very simple issue, but as I'm new to Wildfly I haven't had success trying to accomplish it.
In the old days of JBoss 4.2, when I wanted to share an ejb jar file with multiple war files I just deployed the ejb jar file to the application server and configured jndi in my war projects with a file 'jndi.properties' placed in some source directory in the war files, like this:
jndi.properties
---------------
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099
Now, with Wildfly 8.1, this approach is not working anymore. I don't know if the contents of the jndi properties file changed or if I have to do something else. So, I ask: how do I share an ejb jar file with multiple wars in Wildfly 8.1 (I don't want to use ear files for this)?
Thank you in advance.
Marcos
PS.: Cross-posted: https://developer.jboss.org/thread/249133
just deploy the jar file and add adependency to your war file (either in Manifest.MF or in jboss-deployment-structure.xml from your war to your jar. Then you should be able to do JNDI-lookups using java:global/... or using CDI for injecting the beans using #Inject (for this approach you will need to activate CDI using beans.xml)
see also:
Wildfly class loading
Wildfly deployment descriptors
CDI reference
Application deployment
Actually I use MyEclise to develop and deploy a enterprise project(EAR file).
I use Java Build Path to add some other projects and link sources, and added several jar files (as external jar and user library) to my project. (I used J2EE technology and there are some default jar of course )
By myeclise deploying manager I deployed my project on weblogic base_domain and then by weblogic console I deploy it on weblogic.
All is set and there is no problem in all steps.
Now I wanna to create EAR file manually, first I created WAR file which included some jsf files and web-inf directory contains classes, lib directories and some important file like web.xml , facec-config.xml and etc.
In classes folder I have .class files which build correctly from .java files, and on lib directory**I copied all jar file from web-inf/lib directory** which created automatically by myeclipse deploying manager on weblogic base domain folder.
I added this War file into EAR file along APP-INF directory which contains all jar files from APP-INF/lib directory on weblogic base domain folder and META-INF directorywhat contains application.xml file.
When I deploy this ear file on weblogic there is so many error and problems.
Could you tell me what is the correct way to create that EAR file.
Thanks in advance
If you have an enterprise project, just export the EAR file. Right click the enterprise project, select Export, then select MyEclipse JEE->Ear File and follow instructions on the wizard (basically, specify a destination for the EAR file, on the file system). This should give you an EAR file that contains the same as what was deployed on Weblogic.
I need to deploy my ear file in weblogic server. The ear is currently deployed in OC4J . What are all the config changes i need to make in order to achieve this. I have a web module and ear module packaged in my ear file . Please help.
Common steps are
To change oc4j specific config file to weblogic file
orion-web.xml to weblogic.xml
orion-ejb-jar.xml to weblogic-ejb-jar.xml
orion-application.xml to weblogic-application.xml
Change build.xml file to include these files according to the weblogic defined ear structure
Click here for ear structure
I have a play app I've converted to a .war file with play2war and now need to deploy that to tomcat.
Which files do I have to move over to my webapps directory within tomcat and do I need to unpack the war file?
Using Tomcat 7, FYI.
The questions was already answered in the comments.
With 'play war' you can generate the war file. Copy this file to the webapps folder and tomcat will unpack it.
https://github.com/play2war/play2-war-plugin/wiki/Usage
https://github.com/play2war/play2-war-plugin/wiki/Deployment