Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:17:54+00:00 2026-06-09T03:17:54+00:00

I have written a Spring MVC application which displays report of Test cases and

  • 0

I have written a Spring MVC application which displays report of Test cases and suites run in XML view.I have written the model class which is fine and I have written the following files but there’s some problem with Handler Mapping i guess

My controller.java class looks like this

package com.DrAssist.Fitnesse.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.DrAssist.Fitnesse.model.Suite;



@Controller
@RequestMapping("/Suite/{name}")
public class XMLController {

    @RequestMapping(value="{name}", method = RequestMethod.GET, headers = "content-type=application/xml")
    public @ResponseBody Suite getSuiteInXML(@PathVariable String name) {

        Suite suite = new Suite("1",name,"3","Test1","4","5","7","9","550");

        return suite;

    }

}

My web.xml file looks like this

<web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>Spring Web MVC Application</display-name>

    <servlet>
        <servlet-name>mvc-dispatcher</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>mvc-dispatcher</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

</web-app>

and dispatcher-servlet.xml file looks like this

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans     
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <context:component-scan base-package="com.DrAssist.Fitnesse.controller" />

    <mvc:annotation-driven />

    <!--  
    <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />

    <bean id="xmlViewer" 
        class="org.springframework.web.servlet.view.xml.MarshallingView">
        <constructor-arg>
            <bean class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
                <property name="classesToBeBound">
                    <list>
                        <value>com.DrAssist.Fitnesse.model</value>
                    </list>
                </property>
            </bean>
        </constructor-arg>
    </bean>
    -->

</beans>

I am getting a 404 error with console showing error as

No mapping found for HTTP request with URI [/SpringMVC/Suite/suite1] in DispatcherServlet with name ‘mvc-dispatcher’

Please advice It seems the request not getting through from SpringMVC part of /SpringMVC/Suite/suite1] itself.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:17:58+00:00Added an answer on June 9, 2026 at 3:17 am

    You put {name} path variable in both @RequestMapping. Try to leave the first just as @RequestMapping("Suite").

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a Spring MVC application which displays a model in XML format.Its
I have written a VERY simple MVC application which just displays a single string
I have my web application written in Spring MVC. It is quite simple app
My web application is written using Spring MVC + Hibernate. My model is Customer
I have a fairly simple data audit web application written with ASP MVC which
I have a Spring MVC based web application. There are many custom tags written
I have a web service written in Spring MVC. It can be used by
I have written a JUnit test for a private function which is returning String.
I have a forum like web application written in Asp.net MVC. I'm trying to
I'm developing an application using ember.js and a rest API written with spring MVC.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.