Configuring GlassFish To Serve Offline HTML 5 Applications : Adam Bien's Weblog

Configuring GlassFish To Serve Offline HTML 5 Applications : Adam Bien's Weblog Adam Bien's Weblog « NetBeans 7 + JBoss 7... | Main | From JavaFX to JavaE... » Configuring GlassFish To Serve Offline HTML 5 Applications HTML 5 Offline Applications have to specify a cache.manifest file, containing a list of resources to be cached in the browser. In addition this file has to be served with the text/cache-manifest Content-type. GlassFish (v4.0.1 and older) does not serve the cache.manifest with the require content-type, so the browser will silently ignore to locally cache resources. Fortunately, you can easily configure Glassfish editing the default-web.xml file in: glassfish4/glassfish/domains/[YOUR DOMAIN]/config Add the following snippet: <mime-mapping> <extension>manifest</extension> <mime-type>text/cache-manifest</mime-type> </mime-mapping> in the mime-mapping section (e.g. after the line 1169) and restart GlassFish. Now you can shutdown the internet :-) See you at Java EE Workshops at MUC Airport and particularly at Java EE 7 User Interfaces Workshop. We will discuss the fusion of JavaEE 7 with HTML 5 …and JavaFX. Posted at 09:08AM Jul 02, 2013 by Adam Bien , Comments[0]  | Views/Hits: 77 NEW workshop: HTML 5 and JavaScript Essentials , Three days in April 2017: from Java EE 7 Architectures over Microservices to Performance, Troubleshooting and Monitoring On demand workshops: Java EE 7: Bootstrap, Effective, Testing and Microservices available for streaming. Newsletter: airhacks.news A book about rethinking Java EE Patterns Comments: Post a Comment: Name: E-Mail: URL: Notify me by email of new comments Remember Information? Your Comment: HTML Syntax: NOT allowed Number of posts: 1616 Number of comments: 5897 Yesterday's hits: 27971 Today's hits: 12177 Post reads / hour: 1493 Top posts: Adam Bien 178451 Java 8: Reading A File Into A String : Adam Bien's Weblog 68840 Adam Bien's Weblog 46018 Java 7+: Writing A String To File--A One Liner : Adam Bien's Weblog 44541 Simplest Possible EJB 3.1 / REST (JSR-311) Component : Adam Bien's Weblog 22366 Client-Side HTTP Basic Access Authentication With JAX-RS 2.0 : Adam Bien's [...] 19957 Don't use JPA's RESOURCE_LOCAL on the server : Adam Bien's Weblog 15594 Trending (last hour): Java 8 FlatMap Example : Adam Bien's Weblog 10 Java 8: From a for-loop to forEach statement : Adam Bien's Weblog 7 Java 8: Reading A File Into A String : Adam Bien's Weblog 6 Pushing Full Profile Java EE Applications To Amazon EC2 Container Service :[...] 4 Building An Angular 2 Application With Java EE 7 Backend : Adam Bien's Weblog 4 about.adam-bien.com blog archives realworldpatterns.com Real World Java EE Patterns Rethinking Best Practices Order from amazon.de Order from amazon.com Online Workshops ...the last 150 posts Pushing Full Profile Java EE Applications To Amazon EC2 Container Service 20+ Topics in 45 mins -- 35th airhacks.tv Questions and Answers JPA and Microservices, RxJava, CRUD and TX, Gradle, Cross Field Validation, Licensing, MDA or Topics For The 35th airhacks.tv JSON Is The New Data Transfer Object (DTO) Asynchronous WAR To WAR Communication With WebSockets Creating A CustomElement (WebComponent) From Scratch 60k eBills per Hour, Tiny WARs -- Or Java EE 7 In Mass Billing and Public Services Market in Slovenia Launching Java EE Thin WARs In The Clouds Upcoming Cloud, Microservice, Web and Java EE Events Importance of Java EE, JCP, Java EE Guardians and Microprofile--Interview With Reza Rahman Java 8 Base64 Encoding / Decoding Java 8 partitioningBy Example Java 8 groupingBy Example Java Is #1 In January 2017 Spring Boot vs. Wordpress, SOAP Rocks, CDI CMT, Reactive vs. Blocking IO, or 34th airhacks.tv is available 2017 Predictions Java EE vs. Spring, State of Microprofile, Is SOAP nice? Oracle targets non-payers or the topics for the 1.2017 / 34th airhacks.tv My Blog is a Personal Notepad Java 8: Converting An Array To A Stream Scalable, Productive, Decoupled, Resilient and Hacky New 2017! How To Maximize Fun In Enterprise Projects URL Templates With JAX-RS GlassFish on Steroids, Micro, Full, Clouds and Commercial Support--An Interview With Dominika Tasarz Load Balancing Microservices With Docker, nginx and TomEE Accidental Spring Evangelism, Rolling Updates, Log Management, Exception Factories, Docker, Queuing Choices or 33rd airhacks.tv Java EE 8 News, Central Logs, Layering, Util, ExceptionFactories, JDBC in Docker, DTOs, Lombok--Or 33rd airhacks.tv TomEE 7.0.2 Full--Docker Smoke Test Slicing The Monolith--With Java EE And Docker HTTP Status Code Test Service: statustest Custom Matchers, Better Messages: JAX-RS Client Rulz v0.0.4 released New Java EE Related Docker Images Arrived: Docklands Adding And Substracting Path Instances With Java How Many "Util"(-ities) Classes Ship With Java 8? Class Naming: Suffix "Util" Is Evil Slideless Microservices From Oredev Unwrapping Exceptions With ApplicationException Microservices Simplify Exception Handling in JAX-RS Serializing PO