Recent Posts
Classroom Teacher and News
Return To Blog Listing
Blogs about teacher therapy, quotes, lecture, Source Code and other notes
Recent Posts Tagged With 'java source code'
JDBC Java Database Tutorial
JDBC Java Database TutorialWhat is JDBC?JDBC is Java application programming interface that allows the Java programmers to access database management system from Java code. It was developed by JavaSoft, a subsidiary of Sun Microsystems.DefinitionJav...
Java Web programming : Tutorial Servlet Life cycle
Java Web programming : Tutorial Servlet Life cycleDestruction There are times when a servlet container will run out of memory, or detect that the amount of free memory it has is within a certain threshold. When this happens, the container will attemp...
Java Tutorial Servlet Lifecycle : Service
Servlet Lifecycle : ServiceThis is the phase when a servlet is in for the bulk of its lifetime. In this phase, the servlet can be repeatedly called by the container to provide its functionality.The following is the signature of the method invoked by ...
Java Tutorial : Servlet Lifecycle : Initialization
Servlet Lifecycle : Initialization In this phase, the servlet is primed for use in the application. Like the instantiation phase, a servlet goes through this stage only once. It is only after this phase that our object instance can start to be call...
Java Tutorial Servlet Lifecycle : Instantiation
Servlet Lifecycle : InstantiationIn this stage, the servlet class is loaded into memory, and an instance of it created by the servlet container.By default, a servlet container practices what is called lazy loading. Using this method, a servlet class ...
Java Tutorial Web programming : Servlet Lifecycle
Servlet Lifecycle A servlet is managed through a well-defined lifecycle described in the servlet specification. The servlet lifecycle describes how a servlet is loaded, instantiated, initialized, services requests, destroyed and finally garbage col...
Java Tutorial Web programming: Servlet Architecture Overview
Java Tutorial Web programming: Servlet Architecture OverviewPrior to Servlets, one of the most common ways of adding functionality for a web server was through the use of Common Gateway Interface (CGI). CGI provides a server an interface to an extern...
Java Tutorial Web programing: Servlets
Java Tutorial Web programing: ServletsIntroductionDefinitionA servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model as adapted from j2EE Tutori...
Java Web Programming : Containers
ContainersCentral to the concept of any J2EE application is the Container. All J2EE components, including web components (servlets, JSPs) rely on the existence of a container; without the appropriate container, they would not run.Perhaps another way ...
Java Tutorial : Web Programming
ServletsServlet technology is Java's primary answer for adding additional functionality to servers that use a request-response model. They have the ability to read data contained in the requests passed to the server and generate a dynamic response ba...
Java Tutorial Web Application : J2EE Web Tier Overview
Java Tutorial : J2EE Web Tier OverviewThe Java 2 Enterprise Edition (J2EE) platform is a platform introduced for the development of enterprise applications in a component-based manner. The application model used by this platform is called a distribut...
Java Tutorial HTTP Requests : POST method
Java Tutorial HTTP Requests : POST methodThe other kind of request method that you are most likely to use would be the POST request. These kinds of requests are designed such that the browser can make complex requests of the server. That is, they are...
Java Tutorial Web Programming : Dynamic Over Static Pages
Java Tutorial Web Programming : Dynamic Over Static PagesThe kind of content that can be served up by the web server can either be static or dynamic. Static content is content that does not change. This kind of content usually just sits around in sto...
Java Tutorial HTTP Requests
Java Tutorial HTTP RequestsRequests from the client to the server contain the information about the kind of data the user is requesting. One of the items of information encapsulated in the HTTP request is a method name. This tells the server the kin...
Java Tutorial Web Application terms
HTML How does the browser know what to display to the user? Most web sites do not have just simple text content, but instead employ graphics or have forms that retrieve data. How does each browser know what to display?The answer lies with HTML, an ...
Java Tutorial : Client-Server Architecture
Java Tutorial : Client-Server ArchitectureThick and Thin ClientsA web application is a kind of application that makes use of what is called a client-server architecture. In this kind of architecture, a client program connects to a server in retrievin...
Java Tutorial : Introduction to Web Programming
Java Tutorial : Introduction to Web ProgrammingWhy the Web?Welcome to this course on web programming. To start things off, let's begin with a better appreciation of why it is worthwhile for companies and programmers alike to focus on web programming....
Java Source Code Tutorial: A Simple AWT Application
Java Source Code Tutorial: A Simple AWT ApplicationYou probably have some programs lying around that use regular AWT buttons that you'd love to replace with image buttons, but you don't have the time or, honestly, the necessity to produce your own im...
Java Tutorial Sour Code: Addressing Methods
Java Tutorial Sour Code: Addressing MethodsIn creating a data structure, it is important to determine how to access the data items. It is determined by the addressing method used. There are two types of addressing methods in general – computed and ...
Java Tutorial Sour Code: Algorithm
Java Tutorial Sour Code: AlgorithmAlgorithm is a finite set of instructions which, if followed, will accomplish a task. It has five important properties: finiteness, definiteness, input, output and effectiveness. Finiteness means an algorithm must te...
Java Tutorial: Data Type, Abstract Data Type and Data Structure
Java Tutorial: Data Type, Abstract Data Type and Data StructureData type refers to the to the kind of data that variables can assume, hold or take on in a programming language and for which operations are automatically provided. In Java, the primiti...
Java Tutorial Basic Concepts and Notations
Java Tutorial Basic Concepts and NotationsIntroductionIn creating a solution in the problem solving process, there is a need for representing higher level data from basic information and structures available at the machine level. There is also a need...
Java Tutorial Source Code: The Callable Interface
Java Tutorial Source Code: The Callable InterfaceRecall that there are two ways of creating threads. We can either extend the Thread class or implement the Runnable interface. In whichever technique used, we customize its functionality by overriding ...
Java Tutorial: Interthread Communication
Java Tutorial: Interthread CommunicationIn this section, you'll learn about the basic methods used to allow threads to communicate with other concurrently running threads.Methods for Interthread Communicationpublic final void wait()Causes this thread...
Java Tutorial Source Code: Producer-Consumer Example
Java Tutorial Source Code: Producer-Consumer ExampleThe following example is an implementation of the Producer-Consumer problem. A class which provides the methods for generating and consuming an integer value is separated from the Producer and the C...
Java Tutorial Source Code: Second Synchronized Example
Java Tutorial Source Code: Second Synchronized ExampleHere is still another version of the preceding code. Again, the print method here of the TwoStrings class is now synchronized. But, instead of applying the synchronized keyword to a method, it is ...
Java Tutorial Threads: Locking an Object
Java Tutorial Threads: Locking an Object To assure that only one thread gets to access a particular method, Java allows the locking of an object including its methods with the use of monitors. The object enters the implicit monitor when the object's...
Java Tutorial Thread Class Methods
Java Tutorial Thread Class MethodsNow, these are some of the methods provided in the Thread class.Thread Methodspublic static Thread currentThread() Returns a reference to the thread that is currently running.public final String getName() Returns the...
Java Tutorial Source Code: Synchronization
Java Tutorial Source Code: SynchronizationSo far, you've seen examples of threads that are running concurrently but are independent of each other. That is, threads run at their own pace without concern for the status and activities of the other concu...
Java Tutorial Source Code: Extending vs. Implementing
Java Tutorial Source Code: Extending vs. ImplementingOf the two ways of creating threads, choosing between these two is a matter of taste. Implementing the Runnable interface may take more work since we still have to declare a Thread object and call ...
