Note that there are some explanatory texts on larger screens.

plurals
  1. POError while splitting application context file in spring
    primarykey
    data
    text
    <p>I am trying to split the ApplicationContext file in Spring.</p> <p>For ex. the file is testproject-servlet.xml having all the entries. Now I want to split this single file into multiple files according to logical groups like : group1-services.xml, group2-services.xml</p> <p>I have created following entries in web.xml :</p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;testproject&lt;/servlet-name&gt; &lt;servlet-class&gt; org.springframework.web.servlet.DispatcherServlet &lt;/servlet-class&gt; &lt;init-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; /WEB-INF/group1-services.xml, /WEB-INF/group2-services.xml &lt;/param-value&gt; &lt;/init-param&gt; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; &lt;/servlet&gt; </code></pre> <p>I am using SimpleUrlHandlerMapping as:</p> <pre><code>&lt;bean id="simpleUrlMapping"class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt; &lt;property name="order" value="0"/&gt; &lt;property name="mappings"&gt; &lt;props&gt; &lt;prop key="/register.htm"&gt;RegisterController&lt;/prop&gt; &lt;prop key="/payroll_services.htm"&gt;PayrollServicesController&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>I also have the controller defined as :</p> <pre><code>&lt;bean id="PayrollServicesController" class="com.triforce.b2bseek.businessservices.controller.PayrollServicesController"&gt; &lt;property name="facadeLookup" ref="FacadeLookup"/&gt; .. .. &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>The problem is that I have splitted the ApplicationContext file "testproject-servlet.xml" into two different files and I have kept the above entries in "group1-services.xml". Is it fine? I want to group things logically based on their use in seperate .xml files.</p> <p>But I am getting the following error when I try to access a page inside the application :</p> <pre><code>org.springframework.web.servlet.DispatcherServlet noHandlerFound WARNING: No mapping for [/TestProject/payroll_services.htm] in DispatcherServlet with name 'testproject' </code></pre> <p>Please tell me how to resolve it.</p> <p>Thanks in Advance !</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload