The problem is that you mapped your servlet to /register.html
and it expects POST method, because you implemented only doPost()
method. So when you open register.html
page, it will not open html page with the form but servlet that handles the form data.
Alternatively when you submit POST form to non-existing URL, web container will display 405 error (method not allowed) instead of 404 (not found).
To fix:
<servlet-mapping> <servlet-name>Register</servlet-name> <url-pattern>/Register</url-pattern> </servlet-mapping>
Related Posts:
- Can’t find mysqladmin on Mac OSX 10.6.8
- java.lang.NumberFormatException: null i
- WebServlet cannot be resolved to a type
- how to fix Cannot call sendRedirect() after the response has been committed?
- What is the difference between JSF, Servlet and JSP?
- How to specify the default error page in web.xml?
- Spring Boot – Unable to resolve Whitelabel Error Page
- What is Java Servlet?
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
- What does request.getParameter return?
- How to request.getParameterNames into List of strings?
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- Session TimeOut in web.xml
- How to solve DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502
- Why do I get SQLCODE=-204, SQLSTATE=42704 with DB2 LUW and WebSphere App Server?
- What is the difference between response.sendRedirect() and request.getRequestDispatcher().forward(request,response)
- How to solve javax.net.ssl.SSLHandshakeException Error?
- Uri not Absolute exception getting while calling Restful Webservice
- org.apache.jasper.JasperException: Unable to compile class for JSP:
- java.sql.SQLException: No database selected – why?
- How to solve the “failed to lazily initialize a collection of role” Hibernate exception
- HTTP Status 500 Error instantiating servlet class
- What does this expression language ${pageContext.request.contextPath} exactly do in JSP EL?
- An established connection was aborted by the software in your host machine tomcat jackson
- Response has aready been committed
- Cannot issue data manipulation statements with executeQuery()
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- Connection Java – MySQL : Public Key Retrieval is not allowed
- what is the difference between doGet() and doPost() in term of the flow?
- Static Final Long serialVersionUID = 1L
- getOutputStream() has already been called for this response
- The import javax.servlet can’t be resolved
- What does Java option -Xmx stand for? [duplicate]
- How do I convert a String to an int in Java?
- What does Java option -Xmx stand for? [duplicate]
- Is there an invisible character that is not regarded as whitespace?
- Problem with gif with transparent background
- Finding white rectangle in an image
- 1000 * 60 * 60 * 24 * 30 results in a negative number [duplicate]
- How to convert nanoseconds to seconds using the TimeUnit enum?
- Search for words with telephone numbers from 2-3-4 tree
- Using or ‘|’ in regex [duplicate]
- How to format strings in Java
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- What is the difference between x86 and x64
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- && (AND) and || (OR) in IF statements
- How to use the toString method in Java?
- What is a NullPointerException, and how do I fix it?
- What exactly is Apache Camel?
- Unable to find valid certification path to requested target – error even after cert imported
- Unable to find valid certification path to requested target – error even after cert imported
- What is the equivalent of the C++ Pair
in Java? - Java – Convert integer to string [duplicate]
- Getting random numbers in Java [duplicate]
- What is an instance variable in Java?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- Java: “error: cannot find symbol”
- How does the Java ‘for each’ loop work?
- What is a StackOverflowError?
- How to uninstall Eclipse?
- Is GNU’s Java Compiler (GCJ) dead? [closed]
- How does System.out.print() work?
- How do I “decompile” Java class files? [closed]
- How do I determine whether an array contains a particular value in Java?
- How to initialize an array in Java?
- How does the Java ‘for each’ loop work?
- Java 8 Iterable.forEach() vs foreach loop
- Initialize part of an array in java
- How can I solve Exception in thread “main” java.lang.NullPointerException error [duplicate]
- How to split a string in Java
- What does “Could not find or load main class” mean?
- What does “Could not find or load main class” mean?
- Why am I getting a NoClassDefFoundError in Java?
- How to avoid “ConcurrentModificationException” while removing elements from `ArrayList` while iterating it? [duplicate]
- Eclipse/Maven error: “No compiler is provided in this environment”
- How do I compare strings in Java?
- What is reflection and why is it useful?
- Implementing UML diagram to Java [closed]
- How to round a number to n decimal places in Java
- Using Pairs or 2-tuples in Java [duplicate]
- How do I create a file and write to it?
- Could not reserve enough space for object heap
- When to use LinkedList over ArrayList in Java?
- How to convert a char to a String?
- Difference between Arrays.asList(array) and new ArrayList
(Arrays.asList(array)) - What is the proper way to handle a NumberFormatException when it is expected?
- What causes “Unable to access jarfile” error?
- What does “Could not find or load main class” mean?
- How do you create a dictionary in Java? [closed]
- Reading a plain text file in Java
- Error unable to access jarfile C:\Jar
- Where is JRE 11? [duplicate]
- In laymans terms, what does ‘static’ mean in Java? [duplicate]
- How to convert/parse from String to char in java?
- Reverse a string in Java
- Static Classes In Java
- Is there any doubly linked list implementation in Java?