Announcement Announcement Module
No announcement yet.
Log4JConfigServlet unable to locate classpath:/META-INF/lo4j Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Log4JConfigServlet unable to locate classpath:/META-INF/lo4j

    Since the 'classpath' feature became available, I have placed all my config files: applicationContext.xml, myapp-servlet.xml, views.xml, validator-rules.xml, validation.xml etc... under src/META-INF. If I specify a context parameter for log4j in web.xml, the config servlet seems to take the parameter literally and does not resolve it. Can you add this feature before spring 1.1 is released?
    Also, if the same is true for Hibernate i.e 'classpath' cannot be used in specifying the location of the mappingResources, can you add that feature as well?


  • #2
    Please file a feature request in Jira, as I can't see this making it in for 1.1, which is a day or two away. However, I don't necessarilly think it's a given that every class which takes a file path now needs to be updated to take the 'classpath:' prefix, to tell you the truth...

    Also, /META-INF is not a standard classpath location. What environment are you running that adds /META-INF to the classpath?



    • #3
      Actually, this is not a big deal. The feature would simply add consistency to my configuration. Here is what I mean:



      <!--This does not work-->

      <!--This will do for now provided that my app classes are not archived and they are placed in WEB-INF/classes-->
      <!--What if I archive my app classes into a jar and place it in WEB-INF/lib and META-INF (where all my config files including applicationContext.xml, log4j.xml, jsp 1.2 TLDs are) is now packaged in the app jar? How can I configure log4j.xml if I do not specify a 'classpath'?-->



      <servlet-class>org.springframework.web.util.Log4jConfigServ let</servlet-class>

      <servlet-class>org.springframework.web.context.ContextLoade rServlet</servlet-class>

      <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>