contextConfigLocation in web.xml creates an IO exception when using intellij

I'm not sure what Intellij does but this seems to work in eclipse without issues.I register a context loader listener and point the classpath to a directory but I get this -> class path resource [src/main/resources/com/myapp/config/dao-context.xml] cannot be opened because it does not exist. Intellij's code completion seems to find it just fine as I type the path and file. Anyone have any clue why this isn't working?

<web-app version="2.4"
    xmlns="" xmlns:xsi=""

    <display-name>Spring MVC Application</display-name>



        <description>DB Connection</description>




1 comment
Comment actions Permalink

Nevermind, I went into Edit Configurations - Tomcat Server - Deployment and changed the application context to the actual context of the project and it fixed it. I think ought to do a video on how to configure exploded deployments for popular containers such as tomcat and jboss. It should also explain the ramifications of what happens when you take the defaults.


Please sign in to leave a comment.