Answer Posted / kunal sagar
first we con compile the java code throught javac compiler.
then,its .class file will be created that .class file copy
and paste the in the directory
c:/program files/apache/tomcat/webapps/servlet/web-inf
/classes.
then back one step backward
change the servlet code with ur file name
and also sevlet mapping code with ur file name
save that file
then open explorar
and type the local host address
| Is This Answer Correct ? | 18 Yes | 6 No |
Post New Answer View All Answers
What is the default http method in the servlet?
What is Servlet API used for connecting database?
When to use doget() and when dopost()?
What are the advantages of cookies?
Which HTTP method is non-idempotent?
When Servlet is unloaded?
What do you mean by cgi and what are its drawbacks?
What is servlet container?
How do I use cookies to store session state on the client?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
Explain the architechure of a servlet?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What are the phases of servlet life cycle?
What is the need of servlet filters?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?