我用 JSP 创建了我的第一个 Java Servlet 应用程序来创建关于书籍的记录并显示它们。index.html 页面加载良好,但项目中的其他页面在部署到 GoogleAppEngine 时无法正常工作。通过 eclipse 在 App Engine 上本地运行时,相同的项目运行良好。我还在“appengine-web.xml”中启用了会话,但问题仍然存在。该应用程序在本地运行时运行良好。通过应用程序引擎运行我得到错误 -
Error: Not Found The requested URL /BookApp was not found on this server.
索引.html
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Create a book entry</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Create A Book</h2>
<form action="BookApp" method="post">
<div class="form-group">
<label for="Title">Title:</label>
<input type="text" class="form-control" id="tbBook" placeholder="Enter Title" name="bookname" required>
</div>
<div class="form-group">
<label for="author">Author:</label>
<input type="text" class="form-control" id="authorname" placeholder="Enter Author" name="authorname" required>
</div>
<div class="form-group">
<label for="cost">Cost:</label>
<input type="text" class="form-control" id="tbCost" placeholder="Enter Cost" name="cost" required>
</div>
<button type="submit" class="btn btn-default">Create</button>
</form>
</div>
</body>
</html>
米琪卡哇伊
相关分类