【发布时间】:2017-06-27 22:47:02
【问题描述】:
我有两个项目部署在我的 tomcat 服务器上。我想将表单操作请求(提交时)发送到部署在同一服务器上的另一个项目中编写的服务。
类似:
<form method ="post" action="http://localhost:8081/simple-web-services/uploadQuestions" enctype="multipart/form-data">
<h3>Choose your file : </h3> <br>
<input type ="file" name ="attachment"></input><br>
<input type="submit" value="submit"></input>
</form
我怎样才能使这项工作?甚至允许这样做吗?
【问题讨论】:
-
它应该可以工作。你得到了什么错误?
-
404 资源未找到。它将当前项目名称添加到 url.."/TestApp/simple-web-services/uploadQuestions" ..
-
在您的情况下,该操作必须是完整的 url。
-
我已经使用了完整的网址,提交后网址变成了..