I have the following in my web.xml file:
<servlet>
<servlet-name>onBoardingUI</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>sample</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>sample</servlet-name>
<url-pattern>*.form</url-pattern>
</servlet-mapping>
and in my sample-servlet.xml file:
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- one of the properties available; the maximum file size in bytes -->
<!-- <property name="maxUploadSize" value="100000" /> -->
</bean>
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/fileupload.form=fileUploadController
</value>
</property>
</bean>
<bean id="fileUploadController" class="com.wrightexpress.si.onboardingui.web.FileUploadController">
<property name="commandClass" value="com.wrightexpress.si.onboardingui.service.UploadFile" />
<property name="formView" value="process-file" />
<property name="successView" value="results" />
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
Now when I deploy the application, I get a 404 when hitting the context root. No exceptions or anything in the server log. I realized that I am setting the URL handler, but for some reason no requests are getting through. I've tried various forms of declaring the servlet-mappings in web.xml to no avail. I have a simple file upload form that has an action of fileupload.form.
Thanks!
EDIT: I have a series of jsp pages that are currently being served up via the viewResolver defined above. These stop working when I add the urlMapping bean in there. Now, I don't know how I should handle this, if I just apply a servlet-mapping of /* in the web.xml file, how do I specify in the sample-servlet.xml file which controller to tie each jsp to other than individually? Or how do I keep my web.xml like it is and only have the defined URL handler handle the fileupload.form action?