if u havea .class file ,how can u say whether it is servlet
or not ,dont use java decompliler

Answer Posted / amitasite

1) Use Reflection API
2) Configure web.xml and configure <servlet> and <servlet-
mapping>. Send request to the URL. If it is not servlet
then will throw exception like
javax.servlet.ServletException: Class
com.request.TestServlet is not a Servlet

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a servlet implemented in code?

791


How do you find out what client machine is making a request to your servlet

762


Define context initialization parameters.

786


What are different methods of session management in servlets?

1006


What are different Authentication options available in Servlets.

789


What is the process to implement doget and dopost methods?

732


What is servletconfig?

751


How httpservlet is different from the genericservlet?

792


Explain how to improve Servlet Performance?

827


What is servlet container. how it works?

879


What do you mean by url pattern in servlet?

830


What are the important functions of filters?

809


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

772


What is the inter-servlet communication?

929


What are the differences between forward() method and sendredirect() methods?

771