Hi guyz,
I have some questions/concepts in mind and want to share with U.So plz. answer and confirm my concepts too!.
Here it starts....
Q1:If the attributes of session are not serialized, then session can be migrated on one machine to another machine?.
**************************************************
Q2: Provided non distributable enviroment, is there one ServletContext for each webapp.Means if there are 3 webapp in a single web server then there will be 3 ServletContext objects are associated with each web appl.?
**************************************************
Q3: My question is on calling getInitParameter() by My
Servlet class instance in init() method.I wnat to know how getInitParameter() is available to My Servlet instance.My logic for this reason......
init() is called by our Servlet class instance(which is either extending GenericServlet or HttpServlet).Therefore if we call this.getInitParameter("name") in init() it will be OK!.B/C getInitParameter() is defined in ServletContext which is assinged in ServletConfig(during initialization) and ServletConfig is implemented by GenericServlet & therefore HttpServlet & hence Our Servlet class and thus available to My Servlet class instance.
Is this correct?
*************************************************
Q4:Why doXXX() methods are declared protected?
*************************************************
Q5:Why HttpServlet is declared abstract even there is no abstract method in this class.
*************************************************
Q6:HttpServlet has two overloaded versions of service()
public void service(ServletRequest req, ServletResponse res)
protected void service(ServletRequest req, ServletResponse res).
My question is that does public service method calls protected service method when recieves any Http request?.
*************************************************
Q7:If we pass diff. Request/Response objects to include() instead of passing the Original Request/Response objecst which we recieve in our servlet then what will happen?...Any Error or Exception?
*************************************************
Q8:What is emant by Fully Qualified Name of class?.For e.g
String class if written as fully qualified name then it will be like this....java.lang.String Means along with full package name.?
*************************************************
Q9:What happen if we arite just name of class in <servlet-class>XYZ </servlet-class> instead of writing Fully Qualified Name, what will happen?.
*************************************************
Q10:If servlet does not generate or fails in generating error page after calling setStatus(int statusCode) then what will happen?(Remember its responsibility of Servlet to generate error page after calling Fully Qualified Name ).
*************************************************
Q11:What is root-cause exception.
Bye & LOT of thanx in advance
Viki.