[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"extension:v3:en:war":3},{"resolvedFromAlias":4,"canonicalExt":5,"ext":5,"name":6,"category":7,"categoryName":8,"updatedAt":9,"popularity":10,"summary":11,"howToOs":12,"quickAnswer":18,"answerIntro":19,"whatIs":20,"description":21,"furtherReading":22,"openInstructions":41,"commonIssues":55,"securityNotes":76,"faq":80,"aliases":93,"mimeTypes":94,"relatedExtensions":96,"breadcrumbs":143,"categoryAnchor":153,"categoryFuturePath":154,"metaDescription":155,"availableHowToOs":156,"openOnDeviceLinks":157,"cannotOpenReasons":173,"cannotOpenFixes":174,"convertOptions":175,"securityAffiliateMessaging":176,"securityAffiliates":177},false,"war","Web Application Archive (WAR)","web","Web","2026-06-12T09:13:27.637Z",55,".war is a Web Application Archive used to package Java/Jakarta servlet-based web applications for deployment on a servlet container (for example, Apache Tomcat or Jetty). It is a ZIP-based Java archive that contains application classes, libraries, and web resources in a standard layout.",[13,14,15,16,17],"windows","mac","linux","ios","android","To open .WAR files on Windows, to run it: install and start a servlet container such as Apache Tomcat or Jetty, then deploy the .war (for Tomcat, place it in the host’s appBase/webapps directory, or use the Tomcat Manager application to deploy a WAR).","To open a .war file, either deploy it to a servlet container (such as Apache Tomcat or Jetty) to run the web app, or open it as an archive to inspect its contents (it is a Java archive). If you just want to look inside, treat it like a ZIP/JAR-style archive; if you want to use it, deploy it.","A WAR (Web Application Archive) is a distribution package for a Jakarta Servlet web application. It contains web resources at the archive root and application code and dependencies under WEB-INF (for example, WEB-INF/classes and WEB-INF/lib), plus optional deployment descriptors like WEB-INF/web.xml. Servlet containers use this structure to load the application and serve its content.","WAR files are the standard deployable unit for servlet-based web applications. They bundle compiled Java classes, third-party libraries, static assets (HTML/CSS/JS/images), and configuration descriptors into one archive so a server can deploy the app consistently.\n\nIn common setups, you copy a .war into a server’s deployment directory (for example, a Tomcat host’s appBase) and the container deploys it, often by expanding it into a directory. Containers such as Tomcat and Jetty also support management/deployment workflows where a WAR is uploaded or placed in a specific deploy location.\n\nAlthough a WAR can be inspected like a normal archive, it is not meant to be “opened” like a document. The practical use is deployment: the servlet container reads the standard directory layout (notably WEB-INF/classes, WEB-INF/lib, and WEB-INF/web.xml when present) to configure class loading and web application behavior.",[23,26,29,32,35,38],{"title":24,"url":25},"WAR (file format) - Wikipedia","https://en.wikipedia.org/wiki/WAR_%28file_format%29",{"title":27,"url":28},"Jakarta Servlet Specification 6.1 (PDF)","https://jakarta.ee/specifications/servlet/6.1/jakarta-servlet-spec-6.1.pdf",{"title":30,"url":31},"Apache Tomcat 8.0 Application Developer's Guide - Deployment","https://tomcat.apache.org/tomcat-8.0-doc/appdev/deployment.html",{"title":33,"url":34},"Apache Tomcat 7 - Manager App How-To","https://tomcat.apache.org/tomcat-7.0-doc/html-manager-howto.html",{"title":36,"url":37},"Web Application Deployment :: Eclipse Jetty","https://stage.jetty.org/docs/jetty/12.1/operations-guide/deploy/index.html",{"title":39,"url":40},"Media Types - IANA (application/java-archive)","https://www.iana.org/assignments/media-types/media-types.xhtml",{"windows":42,"macos":45,"linux":48,"ios":51,"android":53},[43,44],"To run it: install and start a servlet container such as Apache Tomcat or Jetty, then deploy the .war (for Tomcat, place it in the host’s appBase/webapps directory, or use the Tomcat Manager application to deploy a WAR).","To inspect it: open the .war as an archive (it uses the Java archive/ZIP style) and look for folders like WEB-INF/classes and WEB-INF/lib.",[46,47],"To run it: use a servlet container such as Apache Tomcat or Jetty and deploy the .war per the container’s deployment instructions (for example, placing it in the deployment directory).","To inspect it: open it with an archive utility to view the standard web-app layout (WEB-INF, libraries under WEB-INF/lib, and optional WEB-INF/web.xml).",[49,50],"To run it: deploy the .war to a servlet container such as Apache Tomcat or Jetty (for Tomcat this commonly means copying it into the appBase/webapps directory, or deploying via the Tomcat Manager app).","To inspect it: open it as an archive and review the standard structure (WEB-INF/classes for compiled classes and WEB-INF/lib for JAR dependencies).",[52],"iOS is not a practical platform to run a WAR directly; transfer the file to a desktop/server to deploy it on a servlet container, or open it only for inspection using an archive-capable app.",[54],"Android is not a practical platform to run a WAR directly; transfer the file to a desktop/server to deploy it on a servlet container, or open it only for inspection using an archive-capable app.",[56,63,70],{"title":57,"description":58,"steps":59},"Copied the WAR but the app does not deploy or start","Servlet containers expect a specific web application structure inside the WAR. If required classes, libraries, or descriptors are missing or placed incorrectly, deployment can fail.",[60,61,62],"Inspect the WAR contents and verify the standard layout exists (for example: WEB-INF/classes for your compiled classes and WEB-INF/lib for dependency JARs).","If you use a deployment descriptor, confirm WEB-INF/web.xml is present and correctly packaged.","Redeploy using your container’s documented method (for example, place the WAR in Tomcat’s appBase/webapps or deploy via the Tomcat Manager app).",{"title":64,"description":65,"steps":66},"Deployed application behaves differently than expected due to class/library loading","Servlet containers follow defined class loading and web application packaging rules. If you have duplicate libraries, incompatible versions, or misunderstand where classes should be placed, you can get runtime errors or unexpected behavior.",[67,68,69],"Confirm libraries are packaged under WEB-INF/lib and your application classes under WEB-INF/classes (per common container deployment layouts).","Remove duplicate or conflicting JARs in WEB-INF/lib and rebuild the WAR with a clean dependency set.","Consult your container/spec documentation for how the container loads web application classes and resources.",{"title":71,"description":72,"steps":73},"Tried to open the WAR like a normal app and nothing runs","A WAR is a deployment package for a server-side web application; it is not an executable desktop application. It must be run by a servlet container.",[74,75],"If your goal is to run the web app, deploy the WAR to a servlet container such as Tomcat or Jetty and access it through a web browser.","If your goal is to inspect or extract contents, open it as an archive and review the files (WEB-INF, static assets, and libraries).",[77,78,79],"A WAR is server-deployed code: deploying an untrusted WAR to Tomcat/Jetty can execute attacker-controlled application logic within your server environment.","WARs commonly bundle third-party libraries in WEB-INF/lib; outdated or vulnerable dependencies inside a WAR can introduce security issues when deployed.","Be cautious with administrative deployment features (for example, Tomcat Manager’s WAR deployment): restrict access because uploading a WAR is effectively uploading code to run on the server.",[81,84,87,90],{"question":82,"answer":83},"Is a .war file just a .zip?","It is a Java archive-style package that can be inspected like an archive, but it has a specific web application layout (notably WEB-INF/classes and WEB-INF/lib) that servlet containers use for deployment.",{"question":85,"answer":86},"How do I run a .war file?","Deploy it to a servlet container (for example Apache Tomcat or Jetty). The container reads the WAR and serves the web application.",{"question":88,"answer":89},"What files should I expect inside a WAR?","Typically you will see web resources at the root, plus WEB-INF with compiled classes under WEB-INF/classes, libraries under WEB-INF/lib, and often a deployment descriptor at WEB-INF/web.xml.",{"question":91,"answer":92},"What MIME type is commonly used for .war?","A commonly used registered media type for Java archives (often used for JAR/WAR) is application/java-archive.",[],[95],"application/java-archive",[97,103,108,114,120,125,131,137],{"ext":98,"name":99,"category":7,"categoryName":8,"popularity":100,"summary":101,"howToOs":102},"jsx","JSX (JavaScript XML) source file",75,".jsx is JavaScript source code that includes JSX, an XML-like syntax commonly used to write React UI components. You open it in a code editor (for viewing/editing) and typically compile it to plain JavaScript with tools like Babel or TypeScript.",[13,14,15,16,17],{"ext":104,"name":105,"category":7,"categoryName":8,"popularity":10,"summary":106,"howToOs":107},"wasm","WebAssembly binary module",".wasm is the binary module format for WebAssembly, designed to run fast and efficiently in web browsers and other runtimes. You typically “open” it by loading it in a WebAssembly runtime (often via JavaScript in a browser) or by running it with a standalone runtime such as Wasmtime.",[13,14,15,16,17],{"ext":109,"name":110,"category":7,"categoryName":8,"popularity":111,"summary":112,"howToOs":113},"css","CSS stylesheet",39,".css is a Cascading Style Sheets (CSS) text file used to control the look and layout of web pages. You can open it in any text editor, and it is commonly edited with code editors that understand CSS.",[13,14,15,16,17],{"ext":115,"name":116,"category":7,"categoryName":8,"popularity":117,"summary":118,"howToOs":119},"mht","MHTML (Web Archive) file",35,".mht is an MHTML web archive that saves a complete web page (HTML plus images/CSS and other referenced files) into a single file. It’s commonly opened in modern web browsers such as Google Chrome and Microsoft Edge.",[13,14,15,16,17],{"ext":121,"name":122,"category":7,"categoryName":8,"popularity":117,"summary":123,"howToOs":124},"mhtml","MHTML (MIME HTML) Web Archive",".mhtml is a single-file web page archive that packages an HTML document together with its images, stylesheets, and other resources using a MIME multipart structure.",[13,14,15,16,17],{"ext":126,"name":127,"category":7,"categoryName":8,"popularity":128,"summary":129,"howToOs":130},"htm","HTML document",34,".htm is an HTML document (a text file that describes a web page). You can usually open it in any modern web browser or a plain-text/code editor.",[13,14,15,16,17],{"ext":132,"name":133,"category":7,"categoryName":8,"popularity":134,"summary":135,"howToOs":136},"svgz","SVGZ image",27,".SVGZ is a gzip-compressed SVG (Scalable Vector Graphics) image. It opens in most software that supports SVG, including modern web browsers and vector editors that can read compressed SVG.",[13,14,15,16,17],{"ext":138,"name":139,"category":7,"categoryName":8,"popularity":140,"summary":141,"howToOs":142},"xml","XML document",26,".XML files are used for web pages, browser rendering, and front-end assets. Open with web browsers, code editors, or build tools for web development. This guide covers opening methods, troubleshooting, and security best practices. Common MIME type: application/xml.",[13,14,15,16,17],[144,147,150],{"label":145,"to":146},"Home","/",{"label":148,"to":149},"File Extension Index","/file-extension",{"label":151,"to":152},".WAR","/file-extension/war","category-web","/category/web","Learn what .WAR files are, how to open them on every platform, common fixes, and security best practices.",[13,14,15,16,17],[158,161,164,167,170],{"os":13,"label":159,"to":160},"Open .WAR on Windows","/how-to/open-war-on-windows",{"os":14,"label":162,"to":163},"Open .WAR on Mac","/how-to/open-war-on-mac",{"os":15,"label":165,"to":166},"Open .WAR on Linux","/how-to/open-war-on-linux",{"os":16,"label":168,"to":169},"Open .WAR on iOS","/how-to/open-war-on-ios",{"os":17,"label":171,"to":172},"Open .WAR on Android","/how-to/open-war-on-android",[57,64,71],[60,61,62],[],"code_runtime",[178,182],{"name":179,"description":180,"affiliateUrl":181},"Avast","Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.","https://www.avast.com/lp-aff-consumer-store?expid=inf601",{"name":183,"description":184,"affiliateUrl":185},"Norton","Norton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.","http://buy.norton.com/aff_home?utm_campaign=en-ww_nor_n36_aff_nas_nau_nah_cj_nad_low:_sec_nat_mktc_norton_360"]