
Originally Posted by
dr_pompeii
Hello
What is the problem if you move such files within WEB-INF/somedirectory? I think you should do that and with your web.xml do reference to such xml files
Read the Spring Reference documentation
I am learning Spring only because my workplace has decided to we will start using it. So we are slowly getting used to it.
I dont have the ability to change the project structure and the live projects I viewed under SVN also used this structure so I am assuming that is just the way things are going to be done.
Manuel I have this in my web.xml which does reference the xml file. Is this what you were referring to?
Code:
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
If I wanted to load a bean using java code just as a demonstration how would I do this?