Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Create subclass of struts ActionServlet that supports "classpath:" config file paths.

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create subclass of struts ActionServlet that supports "classpath:" config file paths.

We use Spring throughout the web app, and we define beans in several different
spring XML files.. the web app loads spring from these files using a Web app
startup listener provided by Spring called
org.springframework.web.context.ContextLoaderListener (you can find source code
This listener allows us to define the config files as being located "somewhere
on the classpath" by prepending "classpath:" to the file name. So, in web.xml,
we also have this:


This way, the config files don't have to be packaged with the WAR, instead they
are packed in the JARs that contain the actual classes referenced in the config
We want to do the act same thing, but with the struts-config.xml file.
Does this tiny ad smell okay to you?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic