1

I'm new to web application development and is trying to create a very simple example of allowing user to type in their name, submit it and return the text "hello (name)" to the user.

enter image description here

the text box that allow user to enter their name and the submit button are located in a html file called XmlServletForm.html.

enter image description here

and my servlet class look like this

enter image description here

however, when I type in the url address http://localhost:8084/mavenwebproject/XmlServletForm.html, the browser display the 404 error message

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
Thor
  • 9,638
  • 15
  • 62
  • 137

1 Answers1

0

You should try to run at port 8080. localhost:8080/your particular url

  • 1
    Akash (and the one who upvoted this illogical answer), if the server port number was wrong, then the OP would have retrieved a browser specific connection timeout error, not a server specific 404 error message coming from the server itself which should have been impossible if the server itself is unreachable on given URL. Moreover, in the future better post "Try this" shoot-in-the-darks as a comment, not as an answer. – BalusC Aug 21 '16 at 11:40
  • @BalusC thank so much for pointing it out! It seems to me you are a expert in the area of Servlet and JSP, so do you mind if I ask you for some recommedations on textbooks and resource in this area? Thank you so much for your help! – Thor Aug 21 '16 at 11:47