Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2005

Tip: Looking for answers? Try searching our database.

Simple URL Handling not working with Spring MVC

Thread view: 
Kannan - 17 May 2005 08:18 GMT
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 ?
Kannan - 17 May 2005 09:58 GMT
Figured it out had to do something with the context root. should not
have given the 'iwweb'.

Thanks,


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.