The requested URL / save was not found on this server in spring MVC

I am trying to save data to a database through spring MVC. when I click the "Save" button, it redirects me to a page where the error looks like this:

The requested URL / save was not found on this server.

The same code works on DEV on localhost, I think there is a problem with standalone

In Controller.java :

 @RequestMapping(value="/save", params="save") public ModelAndView save(@RequestParam("save") String save) {.....} 

Saved pages update / delete data from the database

+5
source share
2 answers

I wonder if your application is really deployed, but just at a URL that you don't expect. For application servers, it is quite common to add a context URL with the name of a war file. For example, if a war file named myapp.war , your /save url might be visible as

http://www.example.com/myapp/save

+3
source

Maybe your Spring web application is not deploying correctly. please follow the link .

+1
source

Source: https://habr.com/ru/post/1265960/


All Articles