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

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

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

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????

@ruchi bohra: Please read the above comments.

maybe the profile have proble?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.