if u havea .class file ,how can u say whether it is servlet
or not ,dont use java decompliler
Answers were Sorted based on User's Feedback
Answer / kunal
Just Use Reflection to get its SuperClass. If this super
class is Any of Servlet class like HttpServlet or
GenericServlet then this class is a servlet...
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / mamta
when we open .class file if it contain
javax/servlet/Servlet ,javax/servlet/http/HttpServlet
this shows it is a servlet
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / 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 |
Answer / reddy
when we open the .class file
it my contains something like
;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/
HttpServletRespons
where as simple java .class file will not contain this
| Is This Answer Correct ? | 1 Yes | 1 No |
Why do we have servlet wrapper classes?
Is classes folder is compulsory in web-inf/ even though u r deploying ur application with war file?
What are the steps that are required to handle the multi-threading?
What is the process to implement doget and dopost methods?
HTTP tunneling means what?
when the several requests comes to server..how it manage the requests
What do you mean by servlet?
What is servlet and how it works?
What is the capacity that doGet method can send to the server?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
what are the CGI Programs?
What is the difference between get and post methods?