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 8557699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:38:00+00:00 2026-06-11T15:38:00+00:00

I am developing an application using Spring MVC, and Extjs and I have a

  • 0

I am developing an application using Spring MVC, and Extjs and I have a problem, I need to pass a file path to my controller, which going to delete the image with the path. However in my view the path is correct, but when the request arrive in controller the path is without extension.

View : notepad-icon.png

Controller: notepad-icon

@RequestMapping (value = "/delete/{file}", method = RequestMethod.DELETE)
public ModelAndView delete(@PathVariable String file){
    ModelAndView view = new ModelAndView(VIEW);
    service.delete(file);
    view.addObject("success", Boolean.TRUE);
    return view;
}

Can anyone provide me a insight, please ??

  • 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-11T15:38:01+00:00Added an answer on June 11, 2026 at 3:38 pm

    If it is a simple extension can I recommend doing this:

    @RequestMapping (value = "/delete/{file}.{ext}", method = RequestMethod.DELETE)
    public ModelAndView delete(@PathVariable("file") String file, @PathVariable("ext") String ext){
        ModelAndView view = new ModelAndView(VIEW);
        service.delete(file + "." + ext);
        view.addObject("success", Boolean.TRUE);
        return view;
    }
    

    Another way to do this will be a little roundabout – this will be by setting the useSuffixPatternMatch flag in RequestMappingHandlerMapping to false, which should give you the entire filename, however setting the flag is a little difficult.

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

Sidebar

Related Questions

I am developing my application using spring-web-mvc... Now at my Controller it returns like
I am developing a Java Web Application using JSF, Spring and Hibernate. I need
I am using Spring Web MVC and Hibernate for developing my application. My login.jsp
I am developing an application in Spring Web MVC where i need to execute
I'm developing a simple, training application with Spring MVC and Hibernate. I'm using Maven
I am developing a web application using Spring. I need to plot graphs and
I am developing a GWT application which im using Spring Security to handle the
I'm developing an application in JSP using SimpleFormController with Spring MVC 3.0.2 using Hibernate.
Hey I am developing an desktop application using Spring and Hibernate, and I have
I am developing an ASP.NET MVC 3 application using C# and Razor. I have

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.