Pages Navigation Menu

Coding is much easier than you think

RECENT POSTS

Introduction to Struts 2 Framework

Posted by in Struts-2

Introduction to Struts 2 Framework

  In our last article we have learned about the difference between Model 1 and Model 2 (MVC) Architecture. In this article we will learn about Struts 2 framework and about the Architecture which it follows.   In general if you are about to build a standard application using JSP and Servlets, then you will end up in a following MVC pattern.     ** UPDATE: Struts 2 Complete tutorial now available here.   Why web Framework ?   Web framework is a basic ready made underlying of MVC structure, where you have to just...

read more

What’s New in JDK 8

Posted by in Java

What’s New in JDK 8

  Oracle announced the general availability of Java 8 on March 18 2014. One of the features is complete removal of Permanent Generation (PermGen) space. The JDK 8 HotSpot JVM is now using native memory for the representation of class metadata and is called Metaspace”; similar to the Oracle JRockit and IBM JVM’s. The good news is that it means no more java.lang.OutOfMemoryError: PermGen problems and no need for you to tune and monitor this memory space anymore. In Java 8, we will still need to worry about the class...

read more

Extracting Data from Corrupted files using WinRAR

Posted by in Software

Extracting Data from Corrupted files using WinRAR

  If your RAR file is corrupted and when you try to extract the file in it, all you get is an empty folder.   To overcome this issue, check the Keep Broken files checkbox, while choosing the location to save the file to be extracted as shown below.    

read more

How to download video from YouTube without any software

Posted by in Software | 1 comment

  In this article we shall an easy way to download video from YouTube without using any software.     Step 1:   Go to the desired video in YouTube which you are about to download     Here the URL is www.youtube.com/watch?v=ip_0CFKTO9E   **Update:- Read Article on how to extract Data from Corrupted files using WinRAR   Step 2:   To download this video you just need to type in the letters ‘ss’ before the YouTube url, for example after typing the letters ‘ss’ the url will be as...

read more

How to use a JavaBean class as a property in struts 2 action class.

Posted by in Struts-2

How to use a JavaBean class as a property in struts 2 action class.

  In this tutorial we will learn how to use a JavaBean class as a property in struts 2 action.   Consider a scenario, in which you have written an action class, which in turn has a JavaBean class as its property as shown below.   ** UPDATE: Struts 2 Complete tutorial now available here.   Action class   HelloAction.java   package com.simplecode.action; import com.opensymphony.xwork2.Action; import com.simplecode.bo.User; public class HelloAction implements Action { private User user; public User...

read more

How To Change Default Port number of Tomcat Server?

Posted by in Java, Tomcat

How To Change Default Port number of Tomcat Server?

  Tomcat by default runs on port number 8080, but many times other Java application also uses 8080 and starting tomcat may result in java.net.BindException. In order to avoid this exception you can change default port of tomcat from 8080 to some other port   Steps in changing the Tomcat Port   Go to the installation directory of Tomcat Server and then open folder named “conf” and locate the file server.xml and Search for the entry shown bellow:   <Connector port="8080"...

read more

Displaytag export option is not working- Solution

Posted by in Java, Struts 1, Struts-2 | 3 comments

Displaytag export option is not working- Solution

  In this article we will learn to resolve the issue which occurs while exporting the file using display tag,   In order to enable export functionality in display tag, configure display tag in JSP as shown below.   <display:table name="studentList" pagesize="5" export ="true" requestURI="/displaytag.jsp"> <display:column property="rollNo" title="Roll No"/> <display:column property="studentName" title="Student...

read more

What is a Memory Leak and Garbage Collector in java?

Posted by in Java, JVM

What is a Memory Leak and Garbage Collector in java?

  A memory leak is the gradual loss of available memory when a program/application repeatedly fails to free memory that it has occupied for temporary use.     Consider that you have 10 glasses at your house. Whenever these glasses are used they will be cleaned up and kept ready in the stand for future use by the servant when he comes. If you have placed one of the glasses in a room where the servant is not permitted to enter or you have not consumed the juice completely and it is still left in the glass, the servant might think...

read more

How to find the JDK target version from a .class file?

Posted by in Core Java, Java

How to find the JDK target version from a .class file?

  This tutorial gives a tip to find out the JDK compiler target version from a .class file   javap -verbose YourJavaClass   On running the above command in command prompt, it displays the major version number, based on which the JDK Compiler version can be determined.   Below are some example values:   JDK 1.0 -> major version 45 JDK 1.1 -> major version 45 JDK 1.2 -> major version 46 JDK 1.3 -> major version 47 JDK 1.4 -> major version 48 JDK 5 -> major version 49 JDK 6 -> major...

read more

Model 1 and Model 2 (MVC) Architecture

Posted by in Java, Servlet, Struts 1, Struts-2 | 1 comment

Model 1 and Model 2 (MVC) Architecture

  Misconceptions   Student: Master,  what is the difference between MVC 1 and MVC 2 ? Master: Grasshopper, there is no such thing as MVC 1 and MVC 2, there’s just MVC. if you meant to ask about the difference between Model 1 and Model 2 with respect to web applications, then this article will help you out.   In Java there are two types of programming models Model 1 Architecture Model 2 (MVC) Architecture   ** UPDATE: Struts 2 Complete tutorial now available here.   Model 1 Architecture     Flow of...

read more