Ear and War file difference
I have created and loaded WAR files for Web Applications on my Tomcat 4.1.27 web container.
I have also heard about EAR files and was wondering if I have the correct definition. On one of my Google searches it says: EAR files contain JAR files and WAR files.
I assume an EAR file can contain many JAR and WAR files wrapped into one file (EAR)? Another way of looking at it is if I have for example 3 WAR files, I can put all 3 in an EAR file?
All the archive files used in Java apps are basically ZIP files with the extension changed.
JARs are used to package classes.
WARs are used to package web applications ( the complete directory structure are mandated by J2EE specs ) and may contain JARs
EARs are used to package a J2EE application ( think web app + EJBs in general ) and may consist of many web modules packaged as WARs.
Take a look at this too: http://searchwebservices.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid26_gci837938,00.html
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
----------------------------------------------------------------
Similar Messages
-
hi ,
can anyone tell me how to make the ear and war file ??/
Regards,
Shruti.hello shruti
to make war file enter the following command through command prompt
jar -cvf filename.war give one space then .(dot)
bye -
Explain about JAR,EAR and WAR files
Explain :what is JAR,EAR and WAR files and how is useful in creating archive files in java with more example?
Please look up this type of information on your own.
http://java.sun.com/reference/glossary/index.html -
hi,
Does anyone have information on how to use the EARASSEMBLER
tool for creating ear files and war files?????
thanksHi Cheenai,
EARASSEMBLER is an Orion tool and it is not supported in the
current release of Oracle9iAS Containers for J2EE (even though
it's bundled with the installation).
You may download Oracle9i JDeveloper Release Candidate as the
integrated development tool to build, assemble, package and
deploy any J2EE applications (EJB-JAR, WAR, EAR files etc.):
http://otn.oracle.com/software/products/jdev/content.html
You may also download the "ant" command line tool to build and
package J2EE files:
http://jakarta.apache.org/ant/ -
Creating ear and war file from deploy file programatically
Hi All,
Is there any API available in oc4j to create an ear or war file from a .deploy file...........??
Thanx in advance.There isn't a public API that let's you hook up to the deploy file in JDeveloper.
You might be able to achieve this with the JDeveloper Ant task:
http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/anttasks/index.html -
Description of EAR and WAR files
Does anybody know or has a link with the description of the files/directory's that are standard in EAR/WAR files.
Example: what is the functionality of the web.xml.
Thnx.http://java.sun.com/webservices/docs/ea2/tutorial/doc/WebApp3.html
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WCC3.html#64295
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/deployment.html
http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/000101.html
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools8.html#63061 -
How to deploy ear file with jar file and war file with different names
Hi,
As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
Problem:
I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
In config.xml file of WL 6.1, it was mentioned as :
<Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
<EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
<WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
</Application>.
The above is working fine.
But in config.xml file WL10,I cannot mention the same.
I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
I tried the following options:
1) Deploying as a ear file by adding <sub-deployments>
2) Deploying both war and jar seperately which is not recommended in my application.
Please provide the content I should place in the config.xml so that everything works fine correctly.
Any help is appreciated.Hi,
As part of weblogic migration from WL 6.1 sp3 to WL 10, Iam facing some problem.
Problem:
I have one ear file(abc.ear) to deploy which contains one jar file(xyz.jar) and one war file(pqr.war).
In config.xml file of WL 6.1, it was mentioned as :
<Application Deployed="true" Name="abc" Path="./config/mydomain/applications/abc.ear">
<EJBComponent Name="xyz" Targets="myserver" URI="xyz.jar"/>
<WebAppComponent Name="pqr" Targets="myserver" URI="pqr.war"/>
</Application>.
The above is working fine.
But in config.xml file WL10,I cannot mention the same.
I need to have different application anmes for ear,jar and war.If I deploy as a ear file,the jar and war files are deployed with the same ear file name.
I tried the following options:
1) Deploying as a ear file by adding <sub-deployments>
2) Deploying both war and jar seperately which is not recommended in my application.
Please provide the content I should place in the config.xml so that everything works fine correctly.
Any help is appreciated. -
Hi,
i need to know about .ear and .war,what exactly do in atg. why we use.
thanks.They are the standard file formats for storing and distributing JEE applications. A War file groups JSPs, servlets and all related files to create web applications, and a Ear file groups all the various War and Jar files required to create an 'enterprise' application.
Hope this helps. -
Reading Ear file and inner ear or war file
Actually My problem is to read and store the all java files and its path from a Ear file or War file. If a archive contains inner archive as well then the process will be the same for inner jar.
pls give me a sample code so that i can develop my solution
Thanksreply me soon
-
Deploying MBean with ear/jar/war files
Hi!
I'm working on a project where we plan to use jmx to manage our web(servlet) application.
I have created a simple test MBean, and try to create the MBean with MBeanServer.
When i try this, i got a ReflectionException(ClassNotFoundException).
I have try to deploy the MBean together with the war file(inside ear), create
a jar file and put it into myserver classpath(web console)...
Nothing works...
AudunOn 30 Aug 2001 05:17:27 -0800, Audun <[email protected]> wrote:
>
I'm working on a project where we plan to use jmx to manage our web(servlet) application.
I have created a simple test MBean, and try to create the MBean with MBeanServer.
When i try this, i got a ReflectionException(ClassNotFoundException).
I have try to deploy the MBean together with the war file(inside ear), create
a jar file and put it into myserver classpath(web console)...It seems like if you want the MBeanServer to instantiate the MBean,
then you have to put the MBean classes in the server classpath. This
is probably the best approach, if you want a centralized admin MBean
to do management from the WLS admin server across a domain.
If you want an MBean instance per managed server, then you can have
your application (during initialization) instantiate the MBean and
register it with the MBeanServer. This approach lets you package your
MBean classes with your application ear/war/jar.
You might want a combination of both approaches. An admin MBean
manages across the domain, and an MBean on each managed server listens
for attribute change notifications from the admin MBean to deal with
propagating configuration changes to the application running across
the cluster. Unfortunately, I have not found any examples or
documentation on how to get MBean invocations and notifications to
work remotely. (You know it's possible because the WLS MBeans do it!)
<hack> <hack> <hack>
Ben -
How to work with two different backend with same MI Server and war file
Hi All,
We have a requirement that we need to work with one Middleware for two backends. For that we had to copy MAM30 sync bo's to zsync BO'S with the name ZMAM30. Now both sync BO'S will point to different backends.
I have a standard war file which was working well with standards sync bo's. Now to work on zsync bo's what all the changes do I have to do in the standard war file(code).
As per my knowledge we have a file called "syncbonamelist.properties" which maps the sync bo keys. Also there is another file called "mapping.xml" file which maps the package name with BO name.
Can any body please tell me, are there any other files needed to be change like "meRepMeta.xml", other than any existing code like java objects are also needed to be changed.
Your help in this regard is highly appreciable.
Regards
MurthyHi Murthy,
I try to get my head around the question:WHY?
The reason for my question is, that this influences the answer!
Because of several reasons it is NOT possible to handle MAM and zMAM Bos at the SAME TIME on the SAME MACHINE in the way you describe it - and it makes no sence to do so at all! But anyway......
Lets say you have two backends, cause you have two different areas of the company. But both want to use the same MI server - but the client should be independend.
So you need two apps. One uses the MAM BOs and the second one uses the zMAMBos.
If this is the case, dev should be straight forward I think and you solution should work already......... so I ask myself, what is the problem you have? Do you get an error?
- First create a new MEREPMETA-XML with just the zMAMBOs instead of the MAM BOs.
- Change the two files you mentioned above.
This should be all then.
If you have a look into the implementation for MAM001Impl for example, there you find a line like:
private static final String SYNC_BO_NAME
= ResourceBundle.getBundle("com.sap.mbs.mam.bo.impl.syncbonamelist").getString("MAM30_040");
This takes the name from the properties file and maps it to the real BO. So changing the name in the property file to
MAM30_040 = zMAM30_040
will result in MAM uses the zMAM BOs.
Be aware: after you place the WAR file in the WEBAPPS folder and do a restart to deploy the file, you need to do a data reset to make sure the new MEREPMETA.XML is read.
AND: two apps! one for MAM and one for zMAM BOs. One APP is not possible! Cause if you have something like that in the properties file:
MAM30_040 = MAM30_040
MAM30_040 = zMAM30_040
if will only take the first reading.
But I think this is clear to you anyway
Regards,
Oliver -
Problems with properties files and war files in weblogic 5.1
I work with WebLogic 5.1 and I'm trying to deploy a web application which gets
a properties file. If I deploy it as an expanded directory hierarchy (with the
properties files into WEB-INF/classes) I have no problems. While deploying it
by a .war file I get this message: "en_GB java.util.MissingResourceException:
Can't find resource for base name Agent, locale en " (the getBundle() method is
trying to get an english property file). What could I do? Is it really a weblogic
5.1 bug?
Thanks,
David
This issue comes up repeatably. It's a real bug.
I believe this problem was fixed in a 5.1 service pack, but I'm trying to
find out the exact disposition of the issue. Noone seems to be complaining
about this under 6.x, so a fix seems to have been made, the only question is
whether or not it got back-ported to a 5.1 service pack.
Gary
david <[email protected]> wrote in message
news:3ac4a39a$[email protected]..
>
> I work with WebLogic 5.1 and I'm trying to deploy a web application which
gets
> a properties file. If I deploy it as an expanded directory hierarchy (with
the
> properties files into WEB-INF/classes) I have no problems. While deploying
it
> by a .war file I get this message: "en_GB
java.util.MissingResourceException:
> Can't find resource for base name Agent, locale en " (the getBundle()
method is
> trying to get an english property file). What could I do? Is it really a
weblogic
> 5.1 bug?
> Thanks,
> David
-
Xsl:include and WAR Files
We are trying to deploy our application using WAR file approach. We are using
Weblogic 6.0 SP2 All our JSP and servlets are working fine.
We have our reports generated based on XSL files. XSL files are put into the war
file.
In my transformation servlet, I am loading the original xsl file by calling getResourceAsStream(xslFileName);
During the xsl transformation if we have any includes for another xsl file, I
am getting an exception
java.net.MalformedURLException: no protocol: myIncluded.xsl
Basically in my original XSL file I have the following line
<xsl:include href="myIncluded.xsl" />
Could somebody tell me what I should doing to get rid off this exception.
Thanks in advance
SK
The href attribute needs a protocal to determin what kind of uri it is dealing with file,http, etc..
try changing this
<xsl:include href="myIncluded.xsl" />to this
<xsl:include href="file://./myIncluded.xsl" />
or this
<xsl:include href="file://myIncluded.xsl" />
I'm not sure how this plays out seeing how your using the getResourceAsStream method. I dont know if getting a resource this way will allow the xsl processor to resolve the url correctly or not. You may have to use a jar protocal or something like that to get it to work. You may even need to specify the absolute url to the include file. -
Clustering, unix symbolic links, and war files
Hello,
we use symbolic links in our web application to a large shared storage device.
This works when running a single server, when the application is not a war file.
When we cluster the application, the admin server creates a war file, blindly
follows the symbolic links and tries to include all files in the shared storage
device. Bad!
Is there a work-around to this problem in a clustered configuration?
-Thanks-
hi,
can you tell me know you deploy your app to the cluster member
manually? do you run each member as an admin server? how do
you group them into a cluster then?
thanks,
yan
"Philippe Lantin" plantin_AT_cobaltgroup.com wrote:
>
>
>Yes, this method works. I did want to keep a central admin server to
>avoid have
>multiple configuration files, and deploy new code to only one location.
>I suppose
>I could do this via a shared drive.
>
>I have an open case with BEA on this issue. The root of the problem appears
>to
>be that the jar format isn't equipped to deal with symbolic links. Webapps
>which
>are exploded in directories lose their symbolic links when packaged in
>a war.
>
>Thanks,
>
>Philippe Lantin
>
>"Cameron Purdy" <[email protected]> wrote:
>>I've never used that centralized deployment feature; rather I've always
>>configured each of the cluster members manually, partly because of the
>>bug
>>in the admin server in 6.0 (?) that would not allow it to deploy to
>the
>>cluster.
>>
>>Can you try to deploy the application manually?
>>
>>Peace,
>>
>>--
>>Cameron Purdy
>>Tangosol Inc.
>><< Tangosol Server: How Weblogic applications are customized >>
>><< Download now from http://www.tangosol.com/download.jsp >>
>>
>>
>><Philippe Lantin plantin_AT_cobaltgroup.com> wrote in message
>>news:[email protected]...
>>>
>>>
>>> Hi,
>>>
>>> our web application is not a war when we use a single server. We simply
>>use a
>>> directory under "applications". This method works correctly with symbolic
>>links
>>> under weblogic v.6.1.
>>>
>>> To test our application in the cluster, we use the previous single
>>server
>>as the
>>> administration server, leaving the application directory intact. We
>>create
>>a cluster
>>> definition with it's target members using this web application.
>>>
>>> When we start up the cluster members, the administration server creates
>>a
>>war
>>> file that is distributed to to cluster members. This is not somthing
>>we
>>control,
>>> this is automatically done by weblogic.
>>>
>>> This is where we run into trouble. When the admin server creates the
>>war
>>file
>>> to distribute to the cluster target, it follows the symbolic links
>>and
>>recursively
>>> includes all files and directories. This creates a huge war file,
>and
>>is
>>obviously
>>> not the behavior we are looking for.
>>>
>>> Creating a war file manually doesn't help, since jar doesn't support
>>symbolic
>>> links.
>>>
>>> Thanks,
>>>
>>> Philippe Lantin
>>>
>>>
>>> "Cameron Purdy" <[email protected]> wrote:
>>> >I don't understand at which point you are running into a problem.
>>> >
>>> >> we use symbolic links in our web application to a large shared
>storage
>>> >device.
>>> >
>>> >That is not uncommon, for example to use a Sun storage box or EMC
>>with
>>> >some
>>> >fault tolerant characteristics to host the application images etc.
>>> >
>>> >> This works when running a single server, when the application is
>>not
>>> >a war
>>> >file.
>>> >
>>> >Do you mean when it is "exploded"? Does it work with a single server
>>> >when
>>> >the app is a war file?
>>> >
>>> >> When we cluster the application, the admin server creates a war
>>file,
>>> >blindly
>>> >> follows the symbolic links and tries to include all files in the
>>shared
>>> >storage
>>> >> device.
>>> >
>>> >This is the part that I don't follow. Are you using 6.1sp1? What
>are
>>> >the
>>> >steps that you are taking with the admin server?
>>> >
>>> >Peace,
>>> >
>>> >--
>>> >Cameron Purdy
>>> >Tangosol Inc.
>>> ><< Tangosol Server: How Weblogic applications are customized >>
>>> ><< Download now from http://www.tangosol.com/download.jsp >>
>>> >
>>> >
>>> ><Philippe Lantin plantin_AT_cobaltgroup.com> wrote in message
>>> >news:[email protected]...
>>> >>
>>> >>
>>> >> Hello,
>>> >>
>>> >> we use symbolic links in our web application to a large shared
>storage
>>> >device.
>>> >> This works when running a single server, when the application is
>>not
>>> >a war
>>> >file.
>>> >> When we cluster the application, the admin server creates a war
>>file,
>>> >blindly
>>> >> follows the symbolic links and tries to include all files in the
>>shared
>>> >storage
>>> >> device. Bad!
>>> >>
>>> >> Is there a work-around to this problem in a clustered configuration?
>>> >>
>>> >> -Thanks-
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>
>>
>
-
Hi there,
Can an OC4J container 'contain' more than one .war file?
Thanx!Of course. You usually package them in EAR files. Starting with 10.1.3 the Administration Console is able to deploy them too. Like the Enterprise Manager in previous versions.
Maybe you are looking for
-
How do i change the time line in Au from time since recording start to the actual time?
how do i change the time line in Au from time since recording start to the actual time? I have a recording that was started at 10:00 but obviously in Au it starts at 0:0:00. Basically i want to time shift this to 10:00:00
-
Production order print out in CRTD status.
Dear Expert, Please guide me for how to take print out in CRTD status for production order.Has a work around I try to create status profile but still not able to make it. I dont want to change the settings in BS22,since its effect globally.Please let
-
Scrollable Result Set in Oracle 8.1.6 ?
The Oracle8i Release 2 New Features Summary says:: JDBC 2.0 core support plus connection pooling and distributed transactions. My Question is : 8.1.6 provide full JDBC 2.0 Support or just some features not specified? Is there support for an scrollabl
-
Forte WebEnterprise w/ ISAPI - 10055 error
Forte Users, We have a Forte application that is web-enabled via Forte WebEnterprise and intermittently we are receiving 10055 error when following a link. After receiving the error you can either use the back arrow and retry the link or just hit the
-
Someone changed my password on my 5th generation ipod touch, i do i accsess it if its locked?!