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

why we should override only no-agrs init() method.

680


What are different ways for authentication of servlet?

531


What must be implemented by all servlets?

579


What's the architecture of a servlet package?

559


What is httpservlet class?

542






request parameter how to find whether a parameter exists in the request object?

579


What is the directory structure of web application?

530


Explain the different ways for servlet authentication?

534


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

577


Explain the difference between jsp and servlet?

592


How will two or three servlets interact or communicate with each other?

917


How a servlet is unloaded?

592


how many jsp scripting elements are there and what are those?

543


Which method of the httpservletrequest object is used?

574


What do you mean by a filter and how does it work?

543