My first Vertx Web app :
I expect To get the index.html at localhost.8080/Test then find a way to retrieve the data, but the page doesn't show
I have a RequestResponseExample class:
public class RequestResponseExample extends AbstractVerticle {
public static void main(String[] args) {
Vertx vertx = Vertx.vertx();
Router router = Router.router(vertx);
router.post("/Test").handler(rc -> rc.response().sendFile("index.html"));
vertx.createHttpServer()
.requestHandler(router)
.listen(8080);
}
}
And My Html Code index.html
<html>
<head>
<meta charSet="UTF-8">
<title>OTP Authenticator Verification Example Page</title>
</head>
<body>
<form action="/" method="post" encType="multipart/form-data">
<div>
<label>Code:</label>
<input type="text" name="code"/><br/>
</div>
<div>
<input type="submit" value="Submit"/>
</div>
</form>
</body>
</html>