allCards = (new SQLDriver()).getAllCards();
+ model.addAttribute("allcards", allCards);
+
+ return "card";
+ }
+
+ @PostMapping({"/card"})
+ public String greet(@RequestParam("cardname") String cardname, @RequestParam("manacost") int manacost,
+ @RequestParam("power") int power, @RequestParam("toughness") int toughness, @RequestParam("description") String description, @RequestParam("creaturetype") String creaturetype,
+ ModelMap modelMap) {
+ Card newCard = new Card(cardname, manacost, power, toughness, description, "", creaturetype);
+ SQLDriver d = new SQLDriver();
+ d.insertCard(newCard);
+ return "card";
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/jsp/card.jsp b/src/main/webapp/WEB-INF/jsp/card.jsp
new file mode 100644
index 0000000..ede1d1a
--- /dev/null
+++ b/src/main/webapp/WEB-INF/jsp/card.jsp
@@ -0,0 +1,67 @@
+
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+
+
+
+
+ Hello ${name}!
+
+
+ Hello ${name}!
+
+
+
+
+
+
+
+ Card Name |
+ Mana Cost |
+ Power |
+ Toughness |
+ Description |
+ Creature Type |
+
+
+
+
+
+ ${listValue.cardName} |
+ ${listValue.manaCost} |
+ ${listValue.power} |
+ ${listValue.toughness} |
+ ${listValue.description} |
+ ${listValue.creatureType} |
+
+
+
+
+
+
+
\ No newline at end of file