K
Kannan
Hi,
I am trying to configure a simple application in spring. The following
is the entry in my web.xml, servletname is "iwspring"
....
<servlet-mapping>
<servlet-name>iwspring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
My iwspring-servlet.xml (for spring config) looks as follows
<beans>
<bean name="homeController" class="a.b.HomeController"/>
<bean id="viewResolver" .....>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="simpleUrlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/iwweb/home.html">homeController</prop>
</props>
</property>
</bean>
</beans>
I deploy the application and there are no build errors. Somehow when i
access the application through the url
http://localhost:8080/iwweb/home.html it isnot able to find the
resource and the system log prints
12:47:46,618 WARN [PageNotFound] No mapping for [/iwweb/home.html] in
DispatcherServlet with name 'iwspring'.
The mapping is clearly defined in the iwsprin-servlet.xml ?
I am trying to configure a simple application in spring. The following
is the entry in my web.xml, servletname is "iwspring"
....
<servlet-mapping>
<servlet-name>iwspring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>
org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
My iwspring-servlet.xml (for spring config) looks as follows
<beans>
<bean name="homeController" class="a.b.HomeController"/>
<bean id="viewResolver" .....>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<bean id="simpleUrlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/iwweb/home.html">homeController</prop>
</props>
</property>
</bean>
</beans>
I deploy the application and there are no build errors. Somehow when i
access the application through the url
http://localhost:8080/iwweb/home.html it isnot able to find the
resource and the system log prints
12:47:46,618 WARN [PageNotFound] No mapping for [/iwweb/home.html] in
DispatcherServlet with name 'iwspring'.
The mapping is clearly defined in the iwsprin-servlet.xml ?