Takes - review changes
This commit is contained in:
parent
c82c692eb3
commit
93e7e1a51c
@ -13,7 +13,10 @@ public final class TakesContact implements Take {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Response act(Request req) throws IOException {
|
public Response act(Request req) throws IOException {
|
||||||
return new RsWithStatus(new RsWithType(new RsWithBody("Contact us at https://www.baeldung.com"), "text/html"), 200);
|
return new RsWithStatus(
|
||||||
|
new RsWithType(
|
||||||
|
new RsWithBody("Contact us at https://www.baeldung.com"),
|
||||||
|
"text/html"), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,10 @@ public final class TakesIndex implements Take {
|
|||||||
public Response act(final Request req) throws IOException {
|
public Response act(final Request req) throws IOException {
|
||||||
RqFormSmart form = new RqFormSmart(req);
|
RqFormSmart form = new RqFormSmart(req);
|
||||||
String username = form.single("username");
|
String username = form.single("username");
|
||||||
return new RsHtml(new RsVelocity(this.getClass().getResource("/templates/index.vm"), new RsVelocity.Pair("username", username)));
|
return new RsHtml(
|
||||||
|
new RsVelocity(this.getClass().getResource("/templates/index.vm"),
|
||||||
|
new RsVelocity.Pair("username", username))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user