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 |
What are the kinds of http requests?
why we should override only no-agrs init() method.
i have class files in class folder. but i have no java files. but i want to modify the java files which are related to class files . how ?
How ThreadSafe page attribute will be working in Servlet as well as in JSP?Automatically ThresdSafe is true in JSP so service method will be destroy in each and every request or not?so how thresd will handle srevice method?
When Servlet is unloaded?
What is the capacity the doget can send to the server?
I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?
what is the difference between?when we write the code in following manner? class One extends httpservlet { } and class One extends genericservlet { }
How can a servlet be used to generate plain text instead of html?
Why do we have servlet filters?
How is a servlet implemented in code?
Define the lifecycle for executing a jsp page.