Akash Bisht
Akash Bisht

Reputation: 7

Servlet error :- 404 Not Found using HTML WEB FORM DATA

I have created a Servlet using GENERIC SERVLET which is working fine on port 8080 But now i have CREATED another html web form file to accept the input parameters from users, and then i created a Register Servlet(for that to accept the parameters from html page) using get parameter() method, and so that this file can accept the web form data, but when i made my request through html form data, it should accept the parameters and show the results, but instead , it says "404 Not Found" Intellij Idea.. I'm using Tomcat as a webserver

PLEASE HELP ME, Iam including some screenshots and program code..

Program code for HTML :- MY HTML CODE HERE

MY DIRECTORY IN INTELIJ

MY SERVLET CODE HERE

HTML PAGE TO ACCEPT USER FORM DATA

404 NOT FOUND ERROR

MAY BE I don't know how to manage ports ?..

Upvotes: 0

Views: 138

Answers (2)

Akash Bisht
Akash Bisht

Reputation: 7

done !, i just changed the url to localhost:8080/Register and it works !

actually the file Register servlet was listening to port 8080 and the html file was forcing to go to the invalid url –

Upvotes: 0

Charles
Charles

Reputation: 954

Your post url is wrong. It should be /yoyo/web/Userinfoservlet instead of just /Userinfoservlet

Upvotes: 1

Related Questions