当我运行我的项目时,出现“此 URL 不支持 HTTP 方法 POST”错误。有趣的是,两天前它运行得非常好。在我对我的代码进行了一些更改但随后恢复了我的原始代码并给我这个错误之后。请你帮助我好吗?
这是我的 index.html:
<form method="post" action="login.do">
<div>
<table>
<tr><td>Username: </td><td><input type="text" name="e_name"/>
</td> </tr>
<tr><td> Password: </td><td><input type="password" name="e_pass"/>
</td> </tr>
<tr><td></td><td><input type="submit" name ="e_submit" value="Submit"/>
Run Code Online (Sandbox Code Playgroud)
这是我的登录 servlet:
public class Login extends HttpServlet {
/**
* Processes requests for both HTTP
* <code>GET</code> and
* <code>POST</code> methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ …Run Code Online (Sandbox Code Playgroud) 我正在做一个小应用程序.从一个JFrame,我调用另一个JFrame.现在,即使我关闭了父JFrame,我也希望这个子JFrame独立存在.有什么方法可以做到这一点吗?或者这是不可能的?请帮我.如果您需要我发布代码,请告诉我.
谢谢.
我刚刚开始使用 MongoDB。我有一个这样的文件:
{
"_id": "12345"
"body": "Here is the body"
"comments":[
{
"name": "Person 1"
"comm": "My comment"},
{
"name": "Person 2"
"comm": "Comment 2"}
]
"author":"Author 1"
}
Run Code Online (Sandbox Code Playgroud)
我想将此文档更改为:
{
"_id": "12345"
"body": "Here is the body"
"comments":[
{
"name": "Person 1"
"comm": "My comment"
"checks_": 1
},
{
"name": "Person 2"
"comm": "Comment 2"
"checks_": 4
}
]
"author": "Author 1"
}
Run Code Online (Sandbox Code Playgroud)
我试过了:
db.coll.update({ "_id":12345},{ "$set":{ "comments" :{ "checks_": 1}}})
Run Code Online (Sandbox Code Playgroud)
这删除了评论中的所有子文档并添加{checks_:1}到其中。
我哪里错了?
因此,我的工作计算机已连接到github.company.com终端上的GitHub 企业帐户 ( )。现在我也想github.com在这里设置我的个人帐户 ( )。
我一直在关注本教程 - https://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574
和第 3 步,当我要创建我的配置文件应该我HostName是github.company.com还是github.com?我可以有任何(有意义的)名字Host吗?还有,User这里是什么意思?
另外,我如何在终端上的这两个帐户之间切换 - 即我的个人帐户和我的企业帐户?有些事情我需要从我的个人帐户提交,其余的使用企业帐户。