The .jar file can contain any java clasess.For example JDBC driver contains class in .jar file. The .war is actually web archive file which can contain class files and mainly jsp and servlet files. The .ear is enterprise archive file which can contain class files,jsp,servlet and mainly class files for EJB.
Please don't think I'm picking on you, but there are a few things that would be better changed about your post:
Please use a descriptive subject line. "Difference" doesn't tell us anything. How about "Difference between .*ar file suffixes"?
This is a forum dedicated to discussions about the Struts Framework. While Struts does use these files, so do all web applications. Therefore, this question would be better asked in a forum for all web applications such as "JSP" or Servlet"
This sounds a lot like an exam or homework question. Most of us don't mind helping out, but we're not really interested in doing someone else's homework for them. Even so, you'll have a better chance of getting a response if you show that you've already done some work on the problem but still have questions or concerns. Why not tell what you do understand about these files, and then ask about what you don't understand?
[ March 31, 2008: Message edited by: Merrill Higginson ]