Answer the question
In order to leave comments, you need to log in
Not transmitting data via post?
I can't transfer data via Post, Get requests all work. The project worked, but for some reason it stopped...
Method:
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String charsetName = "UTF-8";
String charsetNameIso = "ISO-8859-1";
String title = req.getParameter("title");
String preview = req.getParameter("preview");
String textBody = req.getParameter("textbody");
System.out.println(title);
System.out.println(preview);
System.out.println(textBody);
doGet(req, resp);
}
<form method="post">
<label>Title: <input type="text" name="title"><br></label>
<label>Preview: <input name="preview"><br></label>
<label>Text body: <input name="textbody"><br></label>
<button type="submit" name="submit_text">Submit</button><br>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question