Hello, George! 1- Sure all static files are in webapp folder. (see attached zip file) All I am doing is creating a new Java Standard environment hello world app.
2- I didn't know using <static-files> element to define static files was a must. I was going with this documentation which says it is optional and in fact works without it as long as the static file is inside webapp folder (public-root). But I added the static files section with no help. appengine-web.xml: <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <threadsafe>true</threadsafe> <sessions-enabled>false</sessions-enabled> <runtime>java8</runtime> <system-properties> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> </system-properties> <static-files> <include path="/**.js" > </include> </static-files> </appengine-web-app> web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <mime-mapping> <extension>js</extension> <mime-type>application/javascript</mime-type> </mime-mapping> </web-app> the js file is still served as text/plain. you can check it on this link: https://test4-dot-baruch-221323.appspot.com/test.js The whole hello world project is added for your reference (attached zip file). I deploy from within Eclipse using Eclipse GCP plugin. See below screenshot. This was working fine before September 14 and it broke before September 7 and September 14 -- the version of the app that was deployed on September 7 has js files served as application/javascript where as starting September 14 version, the same files are served as text/plain. Between these dates, there has been no change to the build or deployment, just modifications to the contents of static files. But we regularly update the google cloud sdk on the deployment machine. So I suspect this is a bug introduced in one of the sdks. [image: screenshot.png] - ali On Thursday, December 6, 2018 at 8:58:50 PM UTC-5, George (Cloud Platform Support) wrote: > > Hello Ali, > > You seem to want to deploy a Java app. If this is the case, you must put > your static served files within your app's webapp directory. After you > choose a location for the static files, you must define their location in > the appengine-web.xml file, using the <static-files> element. More detail > can be gathered from the "Getting Started: Serving Static Content" > documentation page. [1] > > App Engine can serve static content such as HTML pages and media such as > images. Static content is anything that will not be executed as JSPs or > Servlets. > > How do you deploy your app? Is it with gcloud app deploy, Maven, or > Gradle? A procedural description, in step-by-step fashion, would be > appreciated. > > [1] > https://cloud.google.com/appengine/docs/standard/java/building-app/static-content > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/6dc601da-dfe3-466d-9afa-30b168034834%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
