0

Hi everyone,
I am using netbeans 6.8 version. I was trying to learn servlet by working around.So i created a html file ,in which i placed a form whose action is given as "login.java" which is a servlet file. But when i run the program and click on the button in the html page,an error is shown.
HTTP Status 404 - /login.java not found


i would be very grateful ,if you could help me.

Regards
Thomas

4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by dresses623
1

I don't believe that you need to put login.java. When you create a servlet it is defined in an xml file where the name of the servlet is set as well as the java class file. So there is a mapping between the servlet name and the class file. Netbeans does that automatically so I believe that if you put action="login" it should work. That is probably the name that NetBeans has given

0

I don't believe that you need to put login.java. When you create a servlet it is defined in an xml file where the name of the servlet is set as well as the java class file. So there is a mapping between the servlet name and the class file. Netbeans does that automatically so I believe that if you put action="login" it should work. That is probably the name that NetBeans has given

@javaAddict
Thanks ,thanks a lot. It worked.
the main problem was tht after creating the servlet file,i renamed it so i think the mapping wasnt proper.
so i deleted the file and created new one. and also removed the .java part in action.

thanks once again

0

even i am having the problem with servlet file..Jsp is not able to call servlet file..its not going to the home page i want ..wat shall i do????

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.