Servlet Context

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions Servlet Context is used to communicate with the servlet container to get the details of web application. It is created at the time of deploying the project. There is only one Servlet Context for entire web application. Servlet Context parameter uses <context-param> tag in web.xml file. Methods of […]

Web.xml

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions To understand web.xml, first let us uderstand what is xml? xml stands Extensible Markup Language. xml is markup language much like html. Xml defines set of rules for encoding document in a format that readable by both as human and machine. Xml was designed to carry and […]

Servlet Example

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions Let us create a simple servlet example using Eclipse IDE. To create servlet application we need to use following steps: Environment used: JDK Eclipse IDE Apache Tomcat Server Java-api Open the Eclipse IDE and Go to File Menu ->New->Select Dynamic Web Project. Enter Project Name click on […]

Generic Servlet and Http Servlet

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions Generic Servlet GenericServlet is an abstract class defined in the Servlet API. For implementing class we need to implement all the methods in javax.servlet.Servlet Interface. Most of the Servlet objects do not need initializing and destroying operations but still we need to implement all the methods in […]

Servlet LifeCycle

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions Servlets are small programs that run at server side and creates dynamic web pages. Servlets respond to any type of requests sent by user. In MVC architecture servlet act as controller. The controller is the logic that processes and responds to the user requests. Life Cycle of Servlets […]

OCMJEA Mock Exam -1

ocmjea-thumbnail

1 . Which of the following are true about Active Replication? It is a fault-tolerance mechanism It is achieved by taking cold back ups Each replica attempts to process each request but extra calls may be intercepted via an interceptor State changes are logged and periodically flushed to the replicas State is synchronized only when […]

How To Update Clipboard Content In Java

java-thumbnail

If you are working on the tools development or similar product developments , then system level programming or OS interaction operations are necessary to access the native data. One of the most frequently used operation is the clipboard data. In particular, if you write program to develop own editors like notepad, clipboard operation is very […]

How To Display Currency For A Locale In Java

java-thumbnail

This example demonstrates how to get currency name for the given locale. This would be very useful for the programmers when you want to display the amount prefixed with the currency symbol dynamically for different countries. You can get the currency object for a given locale by calling Currency.getInstance(locale) method. This returns the currency object which […]

Servlet API

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions The Servlet API is supported by all Servlet containers, such as Tomcat and Weblogic, etc. The Application Programming Interface (API) contains interface and classes to write a servlet program. The servlet API contains two packages as listed below: javax.servlet javax.servlet.http Package javax.servlet javax.servlet contains a number of […]

Introduction to Servlet

java-ee-thumbnail

Java EE Tutorials Servlets Tutorials Servlets Interview Questions What is Servlet ? Servlets are an important component of a J2EE application. Servlets along with JavaServer Pages (JSP) and EJB modules can be termed as server-side J2EE component types. Servlet is a Java Programming Language. Servlets are used to create web applications. Servlets are used to […]