Hello Konstantin Kolinko, I tried to use the PreResource but it does not work.
2020-04-06 10:13:05 WARNUNG org.apache.tomcat.util.digester.Digester endElement No rules found matching 'Context/Resources/PreResources'. This is my context.xml <Context addWebinfClassesResources="true" cookies="true"> <Resource name="jdbc/database" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="xxxx" username="xxx" password="xxx" maxTotal="50" maxIdle="50" maxWait="10"></Resource> <Resources> <PreResources className="org.apache.catalina.webresources.FileResourceSet" base="C:\Users\Guest\git\xxxxx\src\main\resources\META-INF\resources" internalPath="index.html" /> </Resources> </Context> Any idea? > > Gesendet: Montag, 16. März 2020 um 01:01 Uhr > Von: "Konstantin Kolinko" <knst.koli...@gmail.com> > An: "Tomcat Users List" <users@tomcat.apache.org> > Betreff: Re: /META-INF/resources/ and Chrome's DevTools > ??, 15 ???. 2020 ?. ? 13:47, Peter Rader <p.ra...@gmx.net>: > > > > I have my default.js in a frontend.jar's /META-INF/resources/js/ according > > to the specs (last paragraph of point 10.10 in > > https://download.oracle.com/otn-pub/jcp/servlet-3.0-fr-eval-oth-JSpec/servlet-3_0-final-spec.pdf > > ) it is served successfully. This works great! > > 1. If you unpack the file into a directory in your web application > (into its /js/ directory), > it will take precedence over the version packed in the framework jar. > > > 2. It is possible to map files from elsewhere on your hard drive into > your web application. > It can be done with "<PreResources>" element in the > META-INF/context.xml file of your web application. > > For reference: > http://tomcat.apache.org/tomcat-9.0-doc/config/resources.html[http://tomcat.apache.org/tomcat-9.0-doc/config/resources.html] > > > 3. If your Tomcat runs on the same computer. you can run the web > application from an expanded directory, without packing it as a war > file. > > 1) Copy your META-INF/context.xml file as > $CATALINA_BASE/conf/Catalina/localhost/yourwebappname.xml > > 2) Add docBase attribute to the <Context> element in it. > > See > http://tomcat.apache.org/tomcat-9.0-doc/config/context.html#Defining_a_context[http://tomcat.apache.org/tomcat-9.0-doc/config/context.html#Defining_a_context] > > > Best regards, > Konstantin Kolinko Kind regards Peter Rader -- Fachinformatiker AE / IT Software Developer Peter Rader Wilsnacker Strasse 17 10559 Berlin - GERMANY Tel: 0049 (0)30 / 20 9930560 Fax: 0049 (0)30 / 20 9930561 Handy: 0049 (0)176 / 8 7521576 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org