Posts

JSP Directive Taglib

Taglib Directive :- Taglib Directive is used for include the tag from tag library. It defines the prefix for particular tag library. Syntax of Taglib Directivs is : <%@ taglib=" URIToTagLibrary "  prefix=" tagPrefix "%> Example : <%@ taglib uri="struts-bean.tld" prefix="bean"%> <%@ taglib uri="struts-html.tld" prefix="html"%> <%@ taglib uri="struts-logic.tld" prefix="logic"%> <HTML> <HEAD><title>Example Include Directive</title> </HEAD> <BODY>     <logic:empty>            // some logic here …............    </logic:empty> </BODY> </HTML> Taglib is used to define the custom tag library and used the tag of this library through the tag prefix.

JSP Directives Include

Include Directive - Include directives is used for include any static JSP or HTML file in the JSP page. Syntax of Include Directives :- <%@ include  file=”relative Path” %> Example:- First.jsp <HTML> <HEAD><title>Example Include Directive</title> </HEAD> <BODY>     <%@ include file="/second.jsp" %> </BODY> </HTML> second.jsp <h1>Include me</h1> More about :- Include directive works at compilation time of JSP. It statically include JSP or HTML file. Mean content of included file written in the main servlet. The included file might be open and available to all requests, or it might have security restrictions. The JSP page might be recompiled if the included file changes.

Array concept

Image
Array in Java  - Array is a container where we can put the objects or values of same data type. Size of this container will be predefined and fixed length. It means when you will make the object of array then defines the length of array. Now I am trying to explain in image. In this figure, there is a array container with fixed 10 length. There is a value stored at 3 index in this array container. In the java context, We are writing a java program to know how value stored in java programming. java in array Example : public class ArrayExample{   public static void main(String[] args) {       // this is a array container of int data type.       int []array = null;       // Now fixed the length of this array container       array = new int[10];       //Now i have put the value in array at 3rd index.     ...

JSP Directives

JSP Directives -     JSP Directives is very powerful components in the Jsp. In this page you will learn about JSP Directives. JSP Directives are responsible for giving the special information about the jsp to the Jsp container. Jsp Directives tag syntax is : <%@ directive  attribute=”Value” %> JSP has three type of jps Directives tag. page taglib include page Directive : page Directive is used for manipulating the behaviour of the jsp page. Jsp page can be import the java file through the import attribute. If isErrorPage attribute will be true then jsp will work as a error page. There are list of attribute of page directive. autoFlush buffer     contentType errorPage extends import info isErrorPage isThreadSafe language pageEncoding session autoFlush Attribute :- autoFlush Attribute is used to flush the jsp page when buffer size is overflows. By-default the value of autoFlush attribute is true. If you will set value as fa...

Java Classes

Java Classes : Now I will try to explain about the java classes which implements the interfaces of collections framework. There is a list of class within the collections frame work. AbstractCollection AbstractList AbstractMap AbstractMap.SimpleEntry AbstractMap.SimpleImmutableEntry AbstractQueue AbstractSequentialList AbstractSet ArrayDeque ArrayList Arrays BitSet Calendar Collections Currency Date Dictionary EnumMap EnumSet EventListenerProxy EventObject FormattableFlags Formatter GregorianCalendar HashMap HashSet Hashtable IdentityHashMap LinkedHashMap LinkedHashSet LinkedList ListResourceBundle Locale Observable PriorityQueue Properties PropertyPermission PropertyResourceBundle Random ResourceBundle ResourceBundle.Control Scanner ServiceLoader SimpleTimeZone Stack StringTokenizer Timer TimerTask TimeZone TreeMap TreeSet UUID Vector WeakHashMap

autoboxing and unboxing in java

autoboxing and unboxing in java – autoboxing and unboxing concepts is related to primitive data types and its wrapper classes. If any wrapper class holds the value of its primitive data type called boxing. And if any primitive data type holds the objects of its wrapper class called unboxing. autoboxing and unboxing in java is two types : 1) Implicit Auto boxing. 2) Explicit boxing. 3) Implicit unboxing. 4) Explicit unboxing. Implicit Auto boxing – J2SE 5 was added autoboxing. Autoboxing is internal process where primitive data type automatically encapsulated within their wrapper classes. So there is no need to wrap primitive data type to its wrapper classes. There is really very helpful with in collection framework. Because collections framework allows objects instead of primitive data type. Example :- Integer intObj = 786; // Autoboxing List listObj = new ArrayList(); listObj.add(786); // Autoboxing listObj.add(787); // Autoboxing So in this line there i...

Iterator Interface

Iterator Interface -     Iterator Interface is used for retrieve the elements over the collection. Iterator Interface is similar to Enumeration Interface. Iterator Interface has one method extra for remove the elements from collection. Iterator Interface has three methods. boolean hasNext() -           This method is used for just check the presence of elements within the collection. If collection has elements, it returns true otherwise returns false. E next() -     This method is used to retrieve the view of element from the collection.      void remove() -     This method is used to delete elements from the collection which lastly return by the iterator.

Recent Post

Recent Posts Widget