Reference

Thursday, 16 June 2011

JSP Thread Safe or not ?

›
2 comments:
Monday, 30 May 2011

Can a java subclass declare a private method available in its java superclass?

›
Yes. A java private member cannot be inherited as it is available only to the declared java class. Since the private members cannot be inher...

Difference between static and non-static java inner class.

›
A static java inner class cannot have instances. A non-static java inner class can have instances that belong to the outer class.

Java Final Keyword

›
A java variable can be declared using the keyword final. Then the final variable can be assigned only once. A variable that is declared as ...

What is a java marker interface?

›
Java marker interface has no members in it. Marker interface ‘was’ used as a tag to inform a message to the java compiler. Java Marker Inte...

Java finalization

›
Finalization is to give an unreachable Java object the opportunity to perform any cleanup processing before the Java object is garbage colle...

When does the finally clause in java exception block never executes?

›
The finally clause in the try-catch exeception block always executes, irrespective of the occurence of exeception. This is applicable for th...

Can an unreachable Java object become reachable again?

›
Yes. It can happen when the Java object’s finalize() method is invoked and the Java object performs an operation which causes it to become a...

Checked vs Unchecked Exceptions

›
Type of exceptions in java are checked exceptions and unchecked exceptions. This classification is based on compile-time checking of excepti...

Java Pass By Value and Pass By Reference.

›
Pass by value in java means passing a copy of the value to be passed. Pass by reference in java means the passing the address itself. In Jav...

Adapter Pattern

›
An adapter helps two incompatible interfaces to work together. This is the real world definition for an adapter. Adapter design pattern is u...

What is Factory Method Pattern in java

›
A factory method pattern is a creational pattern. It is used to instantiate an object from one among a set of classes based on a logic. Ass...

What is a filter?

›
A filter is used to dynamically intercept request and response objects and change or use the data present in them. Filters should be configu...

Describe Servlet Life Cycle.

›
The interface javax.servlet.Servlet defines the following three methods known as servlet life cycle methods.  public void init(ServletConfi...

Why not declare a constructor in servlet?

›
Technically you can define constructors in servlet. But, the declared constructor cannot access the ServletConfig object or throw a ServletE...

ServletRequest vs ServletResponse

›
ServletRequest and ServletResponse are two interfaces that serve as the backbone of servlet technology implementation. They belong to the ja...

Difference between ServletRequest.getRequestDispatcher and ServletContext.getRequestDispatcher

›
request.getRequestDispatcher(“url”) means the dispatch is relative to the current HTTP request. Example code: RequestDispatcher reqDispObj ...

Difference between ServletConfig and ServletContext

›
Signature: public interface ServletConfig ServletConfig is implemented by the servlet container to initialize a single servlet using init(...

What is preinitialization of a java servlet?

›
In the java servlet life cycle, the first phase is called ‘Creation and intialization’. The java servlet container first creates the servle...

Difference between HttpServlet and GenericServlet

›
javax.servlet.GenericServlet Signature: public abstract class GenericServlet extends java.lang.Object implements Servlet, ServletConfig, jav...

What is servlet mapping?

›
Servlet mapping specifies the web container of which java servlet should be invoked for a url given by client. It maps url patterns to servl...

›
Servlet mapping specifies the web container of which java servlet should be invoked for a url given by client. It maps url patterns to servl...

How to avoid IllegalStateException in java servlet?

›
The root cause of IllegalStateException exception is a java servlet is attempting to write to the output stream (response) after the respons...

What happens if you call destroy() from init() in java servlet?

›
destroy() gets executed and the initialization process continues. It is a trick question in servlets interview. In java servlet, destroy() ...

Servlet Session Tracking Methods

›
Following answer is applicable irrespective of the language and platform used. Before we enter into session tracking, following things shou...

Servlet JSP Communication

›
getServletConfig().getServletContext().getRequestDispatcher(“jspfilepathtoforward”).forward(request, response); The above line is essence o...
›
Home
View web version
Powered by Blogger.