my dog learned polymorphism*
The moose likes JSP and the fly likes we can deploy a folder instead of jar or war what is the difference Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "we can deploy a folder instead of jar or war what is the difference" Watch "we can deploy a folder instead of jar or war what is the difference" New topic
Author

we can deploy a folder instead of jar or war what is the difference

sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
hi all

whats the use of creating jar or war file? we can deploy domain folder directly
what's the use of deploying jar or war file instead of domain folder? what is the difference between jar (or) war

thanks in advance
Albin Joseph
Greenhorn

Joined: Jan 22, 2005
Posts: 21
Hi

That is up to the container. You can deploy a folder instead of WAR file in Weblogic and Tomcat. The only thing is that the folder must follow the correct directory structure. If you want to deploy it on some other place or like that , the WAR will be easy to handle I think.

WAR means WEB ARCHIVE. JAR :- JAVA ARCHIVE.
WAR is an Web Aapplication archive and contains JSPs, "normal" static files (HTML, images, etc.), servlets, tag libraries, and such.


JAR is the "normal" Java Aapplication archive, but in this context it usually contains EJBs instead of code libraries or runnable (e.g. from outside an application container) applications


Java source code examples | Java coding community.
Rahim Vindhani
Greenhorn

Joined: Dec 06, 2005
Posts: 10
Originally posted by Albin Joseph:
Hi

That is up to the container. You can deploy a folder instead of WAR file in Weblogic and Tomcat. The only thing is that the folder must follow the correct directory structure. If you want to deploy it on some other place or like that , the WAR will be easy to handle I think.

WAR means WEB ARCHIVE. JAR :- JAVA ARCHIVE.
WAR is an Web Aapplication archive and contains JSPs, "normal" static files (HTML, images, etc.), servlets, tag libraries, and such.


JAR is the "normal" Java Aapplication archive, but in this context it usually contains EJBs instead of code libraries or runnable (e.g. from outside an application container) applications



.jar files are simple compressed files. you can put classes inside it.
While .war is also compressed file but it has to follow some directory structure as given below.

WAR file structure -
The static HTML files and JSPs are stored in the top level directory.
The Servlet and related class files must be stored in the WEB-INF/classes directory.
Any auxiliary library JAR files must be stored in the WEB-INF/lib directory.
The deployment descriptor is stored as a file named web.xml in the WEB-INF directory.


Rahim Vindhani,<br /><a href="http://www.java-examples.com" target="_blank" rel="nofollow">Java Examples</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: we can deploy a folder instead of jar or war what is the difference