1. What is blank final variable or uninitialized final variable? A final variable declared but not assigned is known as a blank final variable or uninitialized final variable. Introduced with JDK 1.1. 2. How to initialize or give a value for an uninitialized final variable? It is possible with a constructor call only. That is, […]
↧
Java Made Simple: What is blank final variable with Example?
↧
What is static blank final variable in Java with Example?
We have seen earlier, blank final variable and let us see now static blank final variable. 1. What is blank final variable? A final variable declared but not initialized (or not given a value) is known as blank final variable. It can be given a value through a constructor only (but not through a method […]
↧
↧
What is static keyword, static variable, static method Java?
In Java, static is keyword used as an access modifier. It modifies the accessing technique of variables and methods in Java coding. "static" keyword can be applied to variables, methods, inner classes and blocks. We know, to call an instance variable and method, Java requires an object (and thus Java maintains encapsulation). But declaring a […]
↧
Does Java support static local variables inside method?
To answer this question, first we must know the concept of static with variables. Static variables are clearly and more elaborately discussed in . For our question sake, I quote a few points about static variables. A static variable does not maintain encapsulation. There will be only one location for static variable accessed by all […]
↧
Java Made Simple: Can Java constructor be final?
When a class is inherited, the subclass inherits the methods and variables of super class but not constructors. For this reason, constructors are not members of class; only variables and methods are members of a class. As members are inherited, they are permitted by subclass to override with its own functionality. When constructors are not […]
↧
↧
Java Made Simple: Is it possible static class in Java?
Is it possible static class in Java? The answer is both "YES" and "NO". Let us see. Java comes with two types of classes – top-level classes and inner classes (also known as nested classes). A top-level class cannot be static where as a nested class can be static. 1 2 3 4 5 6 […]
↧
JSP Made Simple: What are the prerequisites to learn JSP?
The prerequisites to learn JSP are Knowledge of HTML (especially forms) is essential. Core Java concepts of java.lang and java.util classes (not required networking, multithreading, inner classes and AWT etc.) are essential. Requires practice of Java OOPs programming. A little bit of Servlet knowledge is preferred but not compulsion because sometimes, I compare JSP with […]
↧
JSP Made Simple: What is JSP (Java Server Page)?
JSP stands for "Java Server Pages" and is a server-side Java Web technology to communicate between a Web client and Web server. It was released to the market in 1999 by Sun Microsystems (now purchased by Oracle Corp.). JSP is most powerful and easy to use technology for Web-site development. JSP is a Java technology […]
↧
JSP Made Simple: What are advantages of JSP over Servlets
Servlets are difficult to code which are overcome in JSP. Other way, we can say, JSP is almost a replacement of Servlets, (by large, the better word is extension of Servlets), where coding decreases more than half. In Servlets, both static code and dynamic code are put together. In JSP, they are separated. For example, […]
↧
↧
JSP Made Simple: What is JSP engine or what is JSP container?
To execute a JSP file (known as JSP page), the Web server should be loaded with a software capable to execute JSPs. The software loaded should provide an environment for a JSP to execute. This environment is known as JSP engine or JSP container. Similarly, a Servlet container provides environment for a Servlet to execute. […]
↧
JSP Made Simple: How JSP works or What is JSP Architecture?
1. What is JSP Architecture? Following steps includes the JSP Architecture as shown in the above figure. Web client sends request to Web server for a JSP page (extension .jsp). As per the request, the Web server (here after called as JSP container) loads the page. JSP container converts (or translates) the JSP file into […]
↧
6 Steps of JSP in Tomcat Execution
Install Tomcat server of your choice version by downloading from Apache site. Many versions of Tomcat can be found in the following link. http://tomcat.apache.org/download-60.cgi Check with the documentation of what JDK or JRE version is compatible to the specific Tomcat version. For example I have loaded Tomcat 5.0 and is compatible with JDK 6.0. While […]
↧
JSP Made Simple: Simple JSP Example
Following is your simple program File Name: Hello.jsp Open in notepad with the file name "Hello.jsp" and type the following your simple program. 1 2 3 4 5 6 <body> Every one see, this is my first JSP Program <br> without any JSP tags printing <b> Hello world </b> </body> Screenshot of the […]
↧
↧
View All JSP
What are the prerequisites to learn JSP? What is JSP (Java Server Page)? 15 advantages of JSP over Servlets What is JSP engine or what is JSP container? How JSP works or What is JSP Architecture? 6 Steps of JSP in Tomcat Execution
↧
First JSP Example User Name and Password Login Validation
In this first example, client sends user name and password to JSP on the Server. Server receives, validates and sends back the validation result to client as response. Following is the client-side HTML file calling Validation.jsp File Name: UserPass.html 1 2 3 4 5 6 7 8 9 <body> <form method="get" action="http://localhost:8888/india/Validation.jsp"> <h3> Enter User […]
↧
JSP Made Simple: JSP List of 9 Implicit objects and Scope
One of the advantages of JSP over Servlets is Implicit Objects. Implicit objects make JSP coding simple. In Servlets, the Programmer should create these objects and then use, example, objects of HttpSession, ServletConfig, PrintWriter etc. But in case of JSP, just use them as they are implicitly created and supplied by JSP container. Programmer can […]
↧
Java thread join() Example with screenshot
join() method of Thread class is little bit confusing for a novice to understand straight away. I give in my own style with the aim "Java Made Simple". One thread creates another. See the following code. public class Demo extends Thread { public static void main(String args[]) { Demo d1 = new Demo(); } } […]
↧
↧
JSP Made Simple: JSP List of 4 Implicit Methods
Infact, I don’t think that there are any implicit methods in JSP but I know there are 9 implicit objects. The methods of these 9 implicit objects and classes readily available for the Programmer, I call them, as implicit methods. I concentrate especially on 4 interfaces because the methods of these interfaces are useful to […]
↧
JSP Made Simple: What is Scriptlet with Example Login Form?
Scriptlet is one of the three JSP coding (constructs) elements and the other two being Expression and Declaration. Scriptlet includes maximum dynamic code. It is the processing zone where Programmer writes actual JSP coding. Scriptlet is almost equivalent to the service() method of a Servlet (interms of coding volume and callback). This tutorial focuses on […]
↧
JSP Made Simple: What is Expression in JSP with Example?
Note: It is advised to read Scriptlet tutorial before proceeding this page. The main building blocks of JSP code are Scriptlet, Expression and Declaration. In this posting let us see how to and where to use Expression. We know a JSP page contains both static code (written by Web Designer in simple HTML) and dynamic […]
↧