Back to Top

Monday, 28 January 2013

FRAMEWORK: WHAT IS FRAMEWORK? WHAT’S THE DIFFERENCE BETWEEN FRAMEWORK AND LIBRARY?


Framework:

A framework is a basic conceptual and reusable structure which provides generic functionality, used to solve or address complex issues.

A software framework provides basic architecture, application programming interfaces (APIs) and tools for building application and provides required infrastructure.

Library v/s Framework:

Library: Library or code library is a collection of behavior written is a specific language, which can be used to execute some function. You use it the way you want.

Framework: It controls you. You can’t deviate from the framework rules and create application.

Monday, 28 January 2013 by Anijit Sarkar · 1 Read more »

Sunday, 8 July 2012

J2EE: SERVLET: doGet() vs. doPost()

doGet():

  • protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, java.io.IOException – is a method of Class HttpServlet. It is called by the server (via the service method) to allow a servlet to handle a client's GET request.
  • In doGet(), the client’s request parameters are appended to the URL and sent along with header information.
  • doGet() is not a secured process because the request parameters are clearly visible in the URL.
  • Since request parameters are sent along with header information, so only a limited amount of data should be sent.

Sunday, 8 July 2012 by Anijit Sarkar · 14 Read more »

Monday, 5 March 2012

JAVA: What is the superclass of Exception

java.lang.Throwable is the superclass of all the errors and exceptions in java.

Monday, 5 March 2012 by Anijit Sarkar · 6 Read more »

JAVA: Why Errors are Unchecked?


Error is unpredictable. It can occur at any point and recover is also quite impossible. So it is meaningless to declare such exception. That’s why, in java, error is unchecked.

by Anijit Sarkar · 6 Read more »

Thursday, 1 March 2012

J2EE: SERVLET: Class GenericServlet vs Class HttpServlet


·                    It is an abstract class which defines a generic and protocol independent servlet. Here, protocol independent means, by default, it doesn’t contain inherent support for any particular type of protocol, but it can be extended to provide implementation of any protocol.

·                    Class GenericServlet implements Interface Servlet and Interface ServletConfig  and it belongs to javax.servlet package.

·                    It offers simpler version of the servlet life cycle methods init() and destroy() and the methods of ServletConfig. That’s why, it makes writing a servlet easier.

·                    Here, the method service(ServletRequest req, ServletResponse res) is abstract, so the subclasses must override it. And this is also the reason why the GenericServlet is an abstract class.

Thursday, 1 March 2012 by Anijit Sarkar · 3 Read more »

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar