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

Whether thread can be used in servlets?

964


How can we create deadlock situation in servlet?

1089


What is servlet in web technology?

785


What are the type of protocols used in httpservlet?

830


Explain request dispatcher and its methods.

793


Is servlet a server side scripting language?

836


What is pure servlet?

943


What’s the difference between forward() and sendredirect() methods?

807


Explain the methods of request dispatcher in servlet?

758


Explain the lifecycle of a servlet?

735


Can servlet have a constructor ?

817


What are the functions of an intercepting filter?

732


Which event is fired at the time of project deployment and undeployment?

1075


how the HTML data stored in web server?

2234


What is meant by session? Tell me something about httpsession class?

804