Java <;形式:春天的形式动作

Java <;形式:春天的形式动作,java,spring,spring-mvc,Java,Spring,Spring Mvc,我在web.xml中有一个带有此欢迎页的spring应用程序 <welcome-file-list> <welcome-file>/search/search.do</welcome-file> </welcome-file-list> 这个JSP <form:form commandName="searchForm" name="simpleSearchForm" id="simpleSearchForm" method="pos

我在web.xml中有一个带有此欢迎页的spring应用程序

<welcome-file-list>
   <welcome-file>/search/search.do</welcome-file>
</welcome-file-list>
这个JSP

<form:form commandName="searchForm" name="simpleSearchForm" id="simpleSearchForm"  method="post" action="search/performproductsearch.do" class="TTWForm1"   >

当然,当您输入操作的相对url时,该部分将附加到url中。是的,但我输入了/search/performproductsearch。我是否得到了404--未找到!当然,因为你应该包括上下文。使用
url
标记创建绝对url,并将该值用于操作。
<form:form commandName="searchForm" name="simpleSearchForm" id="simpleSearchForm"  method="post" action="search/performproductsearch.do" class="TTWForm1"   >
http://127.0.0.1:7001/devices/search/search/performproductsearch.do