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

What is the workflow of a servlet?

719


What do you mean by annotations in servlet?

583


What's the use of servletcontext?

681


What are the objects involved when a servlet receives a call from client?

545


What is a generic servlet?

520






What is the purpose of requestdispatcher interface?

616


How to upload a file to the server using servlet?

533


Which application server is best for java?

557


Is servlet thread safe?

520


How can an existing session be invalidated?

661


What is servlet collaboration?

663


List the Different types of servlet?

584


What is the difference between using getSession(true) and getSession(false) methods?

571


How to make sure a servlet is loaded at the application startup?

557


What is servlet container?

664