Can I deploy an application without WAR/EAR in JBoss 6.4.0 eap ?
I need to migrate an application from Weblogic to JBoss. Is it possible to do so without creating the WAR ?
Deploy your app as an exploded set of files within directories, rather than packaged up within war and ear files. For example, assume you have xxx.ear which contains aaa.war. Under the deploy directory, create a directory named xxx.ear. In that directory create two more directories aaa.war. Into those directories place the contents of the two war files. Also, in the xxx.ear directory place the rest of the contents that would have been in the ear file, such as the META-INF/application.xml file.
Now, for example, you can easily add deploy/xxx.ear/aaa.war/some-new-file.html or edit deploy/xxx.ear/aaa.war/some-file.jsp.
Related
I am currently working on an EAR application which has a WEB project and EJB project in it.
To work on eclipse with local set up i do so many build path setups and all.
All these buildpaths show up in .classpath of the project.
Now when i export the EAR and deploy on Server everything works on server.
My doubt is how does server know about my local system paths which are present in .classpath of my project.
Does it mean .classpath has no significance at runtime?
Please explain.
.classpath file is eclipse specific, it will not be bundled with the EAR. Eclipse uses it to set the classpath for the project.
An EAR has a well defined structure and Servlet container understands that structure, using it's knowledge it prods around in the EAR file and extracts classes to load in the runtime.
Obviously server doesn't have any knowledge of your local environment. An EAR (or WAR or JAR) file is a simple archive file (with some specification or the file order and all). You can unzip it using any utility (something like 7zip). Check the structure of the packed EAR, that will give you a better understanding of what goes to your server.
I have an enterprise application .ear which includes few war files.
My .ear file also includes the jersey-server.jar and log4j.jar
These jar files are also part of the shared library that is mapped to the ear.
I would want to remove these files from ear altogether as they are already part of shared library.
when i remove these jars from ear, the http resource that is part of the war files goes unrecognized, 404 error and logs are not redirected to log files.
Can't I remove these files from the ear, use just shared libraries, which helps in reducing the size of the ear ?
Application is deployed in Websphere 8.
Thanks,
Ravi.
When I export a jar fle, I can specify that the lib files be stored in a folder jarfilename_lib. Is the same possible on .war files ?
This will save 99% of my deployment time, I can just copy a small war, and I dont need to copy a heavy war file with all the jar library files.
Yes, it's possible in most webapp containers.
The way it works is, you put your libraries into a shared directory in server, and the libraries will be visible to every webapp deployed.
For example, in tomcat it's /lib directory.
I currently have a working servlet created in Eclipse. When running it from the Tomcat plugin, everything works, and my app shows up at localhost:8080/project_name/. However, when I package the project into a .war file and place it in the /webapps directory of Tomcat and start the server, the servlet cannot be accessed. In Terminal, I can see Tomcat loading my project, and a temporary folder of the unarchived project is also created in /webapps. However, I simply cannot access my servlet.
Note:
I'm using Tomcat 7 and I don't have a web.xml file in my project.
How are you creating the war file? Check if your war files contain jar files under WEB-INF/lib folder and if the class files are not missing. You can easily verify it under tomcat/webapps/[project name] folder.
I have developed a web-service client and tested it as ear on local jboss always. this ear work fine. Now I want to create war for this application. whenever I tries:
project:export:war file
in eclipse, it creates war without any third party dependency jars files added to it. This war does not gets deployed on jboss successfully.
Can anybody guide me hw to create war from ear.
you cannot create war from ear. ear is enterprise archive, and war is web archive. ear may contain many war files. So when you are creating war using eclipse, it creates a web archive. To add your third party jars, put them into the lib folder of your web application, that way it will be included into your war.