Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未找到URI为的HTTP请求的映射-在spring 3.2.4中_Spring_Spring Mvc_Url Mapping - Fatal编程技术网

未找到URI为的HTTP请求的映射-在spring 3.2.4中

未找到URI为的HTTP请求的映射-在spring 3.2.4中,spring,spring-mvc,url-mapping,Spring,Spring Mvc,Url Mapping,我有一个控制器: ... @RequestMapping(value = "/accounts/manageaccount.do", method = RequestMethod.GET) public String initForm(HttpServletRequest request, Model model) { model.addAllAttributes(getModel(request)); return "registerAcco

我有一个控制器:

...
    @RequestMapping(value = "/accounts/manageaccount.do", method = RequestMethod.GET)
    public String initForm(HttpServletRequest request, Model model) {

        model.addAllAttributes(getModel(request));

        return "registerAccountView";
    }


    @RequestMapping(value = "/accounts/saveaccount.do", method = RequestMethod.POST)
    public String saveaccount(HttpServletRequest request, Model model) {

        model.addAllAttributes(getModel(request));

        return "registerAccountView";
    }
... 
当我将此URL放入浏览器时,控制器可以很好地映射

http://127.0.0.1:7001/devices/accounts/manageaccount.do
然后我有了这个jsp

<form method="post" action="saveaccount.do">
</form>

确保web xml中的servlet映射已配置为处理.do请求:

<servlet-mapping>
  <servlet-name>yourServletName</servlet-name>
  <url-pattern>*.do</url-pattern>
</servlet-mapping>

你能粘贴表单所在页面的url和你的web.xml文件吗,拜托?我也试过使用@RequestMapping/帐户来处理同样的问题result@NuñitodelaCalzada您的war文件名是什么?devices_admin是war文件名file@NuñitodelaCalzada然后您的URL应该是:127.0.0.1:7001/devices_admin/accounts/manageaccount.do或将webapps下的文件夹名称更改为devices它已部署在WebLogic服务器版本:12.1.2.0.0中,而不是在TOMCAT@NuñitodelaCalzada在服务器中查找应用程序的名称
<servlet-mapping>
  <servlet-name>yourServletName</servlet-name>
  <url-pattern>*.do</url-pattern>
</servlet-mapping>