serialVersionUID In Serialization If we do not explicitly declare serialVersionUID during serialization then JVM generates this ID based upon the structure of class. And then if we implement another interface or any other class or change the structure of class then JVM will generate different serialVersionUID for the class. After that if we try to…
Singleton In Java
Singleton in java is a class which has only one instance in whole application and provides a getInstance() method to access the singleton instance. There are many classes in JDK which is implemented using Singleton pattern like java.lang.Runtime which provides getRuntime() method to get access of it. There are many ways to create singleton in…
GenericFormHandler And RepositoryFormHandler in ATG
GenericFormHandler And RepositoryFormHandler Classes In ATG Both of these classes in ATG are used to create a custom form handler to deal with user input and repositories. But these two classes have different purposes in terms of creating new form handler. The difference is GenericFormHandler Custom form handlers should typically extend GenericFormHandler, which: Is a…
Request Flow of Struts 1.x
There is following task is happening when you deploy any web-application which is developed in Struts 1.x, Step 1:- All Step of web-application deployment will be done first Process Steps of any web-application at deployment Step 2:- Because of configuring ActionServlet with <load-on-startup> tag, ActionServlet is initialized at container startup. Step 3:- Container invokes service(request,response)…
PHP Mail Function Logging – mail.log
PHP 5.3.0 comes with many new features and one of important concept is Logging of Mail Function. What does it do ? Log all mail() calls including the full path of the script, line number, to address and headers. How does it work ? Go to your php.ini file. Find mail.log in that file. Enable…
Process Steps When We Deploy Any Web Application On Server
When we are creating and deploying any web application on server, the following tasks happened on server side. Step 1:- web.xml parsed by using SAX Parser and stores in to memory. Step 2:- ServletContext object will be created and initialized by sevletContext parameter specified in web.xml. <context-param>………</context-param> Step 3:- Thread Pool will be created. Step 4:- Servlet…
Advance CakePHP Interview Questions
Here is the list of advance Cakephp interview questions that every Cakephp developer should know before going for interview. And here I am just giving overview of answers so for complete answers you should go through respective documentation. Question – How many different type of Cache CakePHP Supports? FileCache ApcCache Wincache XcacheEngine MemcacheEngine RedisEngine FileEngine is always…
Difference between init() & init(ServletConfig)
Question-What’s the difference between init() & init(ServletConfig) and Which is better ? Answer- Before start we have to understand the servlet flow. For example you have servlet LoginServlet which extends HttpServlet public class LoginServlet extends HttpServlet{ } And your HttpServlet internally extends GenericServlet. public abstract class GenericServlet implements Servlet, ServletConfig, Serializable { public GenericServlet() {…