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

  • SEARCH
  • Home
  • 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 7948787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:49:22+00:00 2026-06-04T01:49:22+00:00

I am using Spring MVC 3 and all I am trying to do is

  • 0

I am using Spring MVC 3 and all I am trying to do is submitting a form with post request and redirecting the post request handler on the controller to some page. But I am getting the following error when I try to do that:

javax.servlet.ServletException: Circular view path [thanks.htm]: would dispatch back to the current handler URL [/wickedlysmart/thanks.htm] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

Following is the code I am using:

Request handler:

@RequestMapping(method=RequestMethod.GET, value="thanks")
public ModelAndView thanks() {
    logger.debug("redirecting..");
    return new ModelAndView("thanks");
}
@RequestMapping(method = RequestMethod.POST, value="talk")
public String processContactForm(HttpServletRequest req) {      
    //...
    return "redirect:thanks";
}

View resolver in spring application context:

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">

    <property name="prefix" value="" />
    <property name="suffix" value=".htm" />

</bean>

I am not quite able to understand what is going on here. I see “redirecting..” being logged and then I get this error. Could someone help me with this issue?

Thanks.

  • 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-04T01:49:24+00:00Added an answer on June 4, 2026 at 1:49 am

    Following solved the problem:

    @RequestMapping(method=RequestMethod.GET, value="captured")
    public ModelAndView thanks() {
        logger.debug("redirecting..");
        return new ModelAndView("thanks");
    }
    @RequestMapping(method = RequestMethod.POST, value="talk")
    public String processContactForm(HttpServletRequest req) {      
        //...
        return "redirect:captured";
    }
    

    As you could see, I just changed the redirect from “thanks” to “captured” and modified the “value” for the redirect request handler from “thanks” to “captured” as well and it worked. Thanks.

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

Sidebar

Related Questions

I am trying to post data to MVC controller action but have been unsuccessful
I am trying to handle the http-post from a web form using MVC 2s
I'm trying to create a form using Spring @MVC 3.0. This form is supposed
I'm using Spring MVC and jquery autocomplete, my spring controller looks like this @RequestMapping(value
I'm using Spring's form tag library in a Spring MVC application that I am
In my webapp, I am using Spring MVC as my controller layer. However, using
I'm trying to write a web application using Spring MVC. I have a configuration
I am trying to make an ajax call using jquery in my spring MVC
I'm trying to use hibernate with spring 3 mvc but at the moment I
I've been experimenting with using mvc-mini-profiler on a ASP.NET website. All of the request

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.