.WAR

Файл WAR

Web Application Archive (Java WAR)
Задать вопрос
БЫСТРЫЙ ОТВЕТ

A WAR (Web Application Archive) is the standard package format for a Java web application. You do not open it like a document; you deploy it to a servlet container such as Apache Tomcat by dropping it into the webapps/ folder. To inspect the contents, rename the file to .zip and open it with 7-Zip.

Разработчик: Sun Microsystems (now Oracle); part of the Java Servlet / Jakarta EE specification Категория: Сжатые файлы Открыть стандартное MIME: application/java-archive
ОТКРЫВАЕТСЯ НА Windows macOS Linux
Связанные: .RAR · .ZIP · .Z01 · .7Z

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Jul 21, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла WAR?

.war (Java Web Archive) is an archive format similar to a JAR file, built on the standard ZIP container. .war files contain Java web applications and server-side components that can be deployed and run on a servlet container such as Apache Tomcat or Jetty. Besides compiled .class files, the archive can store additional resources to be run on the server, including .jsp pages, static HTML and CSS. The mandatory WEB-INF/ directory holds the web.xml deployment descriptor and a lib/ folder for bundled dependency .jar files.

Using .war files

A .war file, just like any archive, can be unpacked to view the source code and other resources - rename it to .zip and open it with any archive tool. The execution environment, however, requires the application to remain in .war format for deployment; the servlet container handles class-loading and request routing. Modern Spring Boot projects often ship a self-contained fat-JAR instead of a .war, but WAR deployment stays standard on Jakarta EE servers such as WildFly and WebSphere. .war is the web-application counterpart to .EAR archives, which bundle full enterprise applications.

Безопасность и защита

РИСК: MEDIUM

A WAR contains executable server-side code (compiled servlets and bundled JAR libraries), so deploying one runs that code on your server with the server's privileges. Only deploy WARs from trusted sources; a malicious or compromised WAR can host a web shell or vulnerable dependencies. Inspecting (rename to .zip) is safe; deploying is the risky step. Keep your servlet container and the WAR's bundled libraries patched (supply-chain risk, e.g. vulnerable logging libraries).

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕWeb Application Archive (Java WAR)также известен как Java Web Application Archive, WAR file
РАЗРАБОТЧИКSun Microsystems (now Oracle); part of the Java Servlet / Jakarta EE specificationс 1999 (Java Servlet 2.2 / J2EE 1.2)
КАТЕГОРИЯСжатые файлы
MIME-ТИПapplication/java-archive
ТИПZIP-based Java web-application package (binary), variant of JAR with a fixed layout
СТАНДАРТОткрытый · без роялти
СВЯЗАННЫЕ.rar.zip.z01.7z
Это расширение также используется в…
  • Konqueror web archive - KDE's Konqueror could save a web page (and assets) as a .war archive - the (mislabeled) db_name; a rare, legacy KDE use, not the dominant format.
  • WAR (audio/sample) and game data - A few legacy tools used .war for raw audio samples or game asset archives (e.g. some engines); unrelated to the Java format.
MAGIC BYTES · СИГНАТУРА ФАЙЛА
СМЕЩЕНИЕ
00010203
HEX
504B0304
ASCII
PK··
A WAR is a ZIP archive (like JAR/EAR), so it begins with the "PK" header. What makes it a WAR is the internal WEB-INF/ folder (with web.xml, classes/ and lib/) defining a deployable web application. Rename to .zip to inspect. There is no WAR-specific magic number.

Программы, открывающие файлы WAR

Windows3 apps
7-Zip Открытый код Right-click -> 7-Zip -> Open archive to inspect WEB-INF and libraries (it's a ZIP); to deploy, use a servlet container instead.
Apache Tomcat Открытый код Copy the .war into Tomcat's webapps/ folder (or use the Manager app); Tomcat expands and runs it. Requires a JDK/JRE.
IntelliJ IDEA / Eclipse Freemium Open the project and use the IDE's application-server integration to build/deploy the WAR to Tomcat/WildFly.
macOS1 app
Apache Tomcat Открытый код Copy the .war into Tomcat's webapps/ folder (or use the Manager app); Tomcat expands and runs it. Requires a JDK/JRE.
Linux2 apps
Apache Tomcat Открытый код Copy the .war into Tomcat's webapps/ folder (or use the Manager app); Tomcat expands and runs it. Requires a JDK/JRE.
unzip / jar Открытый код 'unzip app.war' or 'jar xf app.war' to inspect contents; deploy with a servlet container to actually run it.

Технические подробности

глубокая спецификация
Container formatZIP archive; magic bytes PK (0x50 0x4B 0x03 0x04) at offset 0 - identical to standard ZIP
Compression methodDEFLATE per-entry (ZIP default); individual entries may be STORED uncompressed
MIME typeapplication/java-archive
Byte orderLittle-endian (inherited from ZIP specification)
Required directory structureMust include WEB-INF/ folder containing web.xml deployment descriptor, classes/ and lib/ subdirectories
EncodingBinary
Typical file size1 MB - 300 MB; varies with number of bundled dependency JARs and static assets
Integrity / signingPer-entry CRC-32; optional JAR code-signing via META-INF/ .SF / .RSA signature files
Max archive entries65,535 (standard ZIP); ZIP64 extension lifts this limit
Deployment targetServlet containers and Jakarta EE application servers: Apache Tomcat, Jetty, WildFly, GlassFish, WebSphere
Version declarationServlet/Jakarta EE spec version stated in WEB-INF/web.xml <web-app> element; optional META-INF/MANIFEST.MF
Class isolationEach deployed WAR gets an isolated classloader; prevents library version conflicts between co-deployed applications
Hierarchy in Java EE packagingWAR is the web-application tier; JAR holds libraries/apps; EAR (Enterprise Archive) wraps WARs and EJB JARs into one deployable unit
Platform supportCross-platform; runs on any OS with a JVM and compatible servlet container (Windows, Linux, macOS)
Hot deploymentMost servlet containers support deploying or replacing a WAR file without full server restart (drop-in deployment)
Выпущен1999 (Java Servlet 2.2 / J2EE 1.2)
Последняя версияTracks Jakarta EE / Servlet spec (Jakarta Servlet 6.0, 2022); WAR layout itself is stable
Открыть стандартноеДа · без роялти
Спецификацияjakarta.ee

Конвертации WAR

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами WAR. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах WAR.

Часто задаваемые вопросы

How do I open or run a WAR file?
Deploy it to a Java servlet container: the simplest path is copying the .war into Apache Tomcat's webapps/ folder, which auto-expands and runs the web app. You need a JDK/JRE installed.
Can I just unzip a WAR file?
Yes for inspection - a WAR is a ZIP, so rename to .zip or run 'jar xf app.war' to see WEB-INF, libraries and pages. But extracting doesn't run the app; deployment to a server does.
What's the difference between a JAR, WAR and EAR file?
JAR packages Java libraries or standalone apps; WAR packages a web application (servlets/JSP under WEB-INF); EAR packages a full enterprise app that can bundle multiple WARs and EJB JARs. All are ZIP-based.
Why won't my WAR file open by double-clicking?
A WAR isn't a document - there's no app to 'open' it. Double-clicking may launch an archiver. To use it, deploy it to a servlet container (Tomcat/Jetty/WildFly).
How do I deploy a WAR to Tomcat?
Stop or keep Tomcat running, copy app.war into the webapps/ directory; Tomcat auto-deploys it to http://host:8080/app. Or use the Manager web app to upload and deploy it.
Can I convert a WAR to an EXE?
No. A WAR is Java bytecode for a JVM/servlet container, not native Windows code. Run it on a Java server, or wrap a JVM with a launcher if you need a desktop-style start.

Ссылки

1Oracle - Java EE web application packagingdocs.oracle.com
2Jakarta EE - Servlet specification (WAR packaging)jakarta.ee

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BINCD/DVD Disc Image (BIN/CUE)
5.NOMEDIAAndroid No-Media Marker File
6.PARTPartial Download File
7.RPMSGRestricted Permission Message
8.EXEWindows Executable (Portable Executable)
9.AVIFAV1 Image File Format (AVIF)
10.DBSQLite Database File

Похожие расширения

.RARRAR Archive (Roshal ARchive)
.ZIPZIP Archive
.Z01Split ZIP Archive - First Part
.7Z7-Zip Archive
.001Split / multi-volume archive - first part (.001)
.ZIRenamed / Truncated ZIP Archive

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z