This week's book giveaway is in the XML and Related Technologies forum.
We're giving away four copies of Java XML & JSON and have Jeff Friesen on-line!
See this thread for details.
Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tomcat embedded Spring  RSS feed

 
Ranch Hand
Posts: 1298
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

when generating a .war from a Spring Boot app with an embedded Tomcat on it. Does it contains the customized code I wrote in the Tomcat server.xml an context.xml?

Regards,Isaac
 
Bartender
Posts: 20307
110
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That came out garbled and I can't understand it. But when you build a WAR and include a META-INF/context.xml file in the WAR, then Tomcat will read that as the server-specific deployment descriptor (as opposed to WEB-INF/web.xml, which is the matching server-independent deployment descriptor). The context.xml will be mined for information such as JDBC connection pool definitions and JNDI external definitions. It will, however, be overridden on a stand-alone Tomcat which deploys the WAR via a TOMCAT_HOME/conf/Catalina/localhost/some-context-pathname.xml file. That shouldn't be an issue with Spring Boot, though.
 
Angus Ferguson
Ranch Hand
Posts: 1298
3
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

But when you build a WAR and include a META-INF/context.xml file in the WAR,



This is the structure of my app. The contexts is in the Tomcat itself but not in the Spring project itself.



Then at the same level of the Spring project



 
Tim Holloway
Bartender
Posts: 20307
110
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That requires more Spring Boot savvy than I have. But I have doubts about the Server stuff. The files you have listed actually go to several different places in a stand-alone Tomcat server, so that isn't how they'd usually appear in a source. And from what I can seen, few, if any of them should be used in a Spring Boot, since there are options in the Spring application.properties file for most, if not all of them.
 
Skool. Stay in. Smartness. Tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!