-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Xavier,
On 1/29/20 3:23 PM, Xavier (Apache) wrote: > Hello Tomcat list, > > I’m struggling with a classpath problem. I have a webapp deployed > under Tomcat. I have setup multiple tests (3 to be exact). They are > all running 9.0.20, one under macOS, and the other 2 under Debian > (same version for both). My app requires the jar lib to be loaded > in a specific order. What I was able to gather so far is that I > should do that customisation in myapp/WEB-INF/context.xml (it looks > like I don’t need to tell Tomcat to look for that file) > > I’m looking for some sample code to better understand how to do > it. > > So far I tried > > <?xml version="1.0" encoding="UTF-8"?> <Context > docBase="\webapps\CloudManager"> <Loader > className="org.apache.catalina.loader.VirtualWebappLoader"/> > <lib>xxxxxx</lib> <lib>yyyyyy</lib> ... </Context> > > xxxxxx and yyyyyy are jar files in myapp/WEB-INF/lib/xxxxxx.jar > > but without any luck. > > I’m probably missing something obvious, but I just can’t find it. Tomcat has no facility to force the loading of specific JARs in a specific order. There has been no consensus that e.g. "alphabetic" ordering should be enforced. There is no (servlet) spec-defined order, either. If you have some special libraries that must be loaded before others (rather than a complete and total ordering), you can use the <PreResources>[1] facility to establish a directory where some libraries are loaded first. I suppose you could use many PreResources, in order, to achieve a total ordering, but it will be a lot of typing. The VirtualWebappLoader has been deprecated for a long time. I can't even find the class in any currently-supported branch of Tomcat. - -chris [1] http://tomcat.apache.org/tomcat-9.0-doc/config/resources.html#Nested_Com ponents -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl4yEJMACgkQHPApP6U8 pFiUiw//ae5zTje1y7YE0wTnBxIVwlM7mz2KaGsZnONEUUMtGsscx7hfgHHIcs+j R6mHSmeoH2YKlvG3qarcCvb0UpNXGjfORslbPcj1U4GQzUcftatcFPLGMejlWVBy xFUcpmGe52zJ4NUWt0zW+3Bq8HfuD2eBJ+eUky9jQ5qS3sOFjrjafiWx2ftjvikd E1qv1haoCq2Y9UwHq4K2gFoS8OTWvs3AHxZyrRYPoyKyQvSg3FTkNvy1DiNEeAqg E6ZDl3FWryur/2PtOV4LhbRE/0UoifCIchrRomHxnbep4cqDx+DivLPgsG8ms4Iv XQJiuWD3lWD3/GHm5ymEMgRNssZsO8EEIwoYkSk0ZueX4TaTWyYO4KEY4YHlukXt igaGjZCcKUVfEJnS8ZcWOhViwn8qNbZHTHi12m/3w/So+TBvbYilcvgGSNf1B6LT yqmPFccFuKYSGeiGhUxo0z0nYTbgXgR07Dwj82DzFmd0pOd8a+KLoYavLaWXnE2u 6oNWTtzXGfNjH0P0s4qqv0vSySxZZ/iP6NNIM0C2uJV4XtSeJGWCQ5R7ozAaNG9U 77VYBojXk/8LmO+asEeqFqex+vZAkVA/wpW1RW47NfgLhtnWY4LE3xeDuKLeclnM EBwyA3DObWdRiqzXv+ydlF9fliQFVEgxD3EaO//vk32Uif0Zbeo= =2Y4Q -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org