Powered by Blogger.

JSP Tag Libraries in Breif

>> Sunday, October 30, 2011

You have many options when it comes to generating dynamic content inside the JSP page.

These options are as follows :
  • Scripting elements calling servlet code directly
  • Scripting elements calling servlet code indirectly (by means of utility     classes)
  • Beans
  • Servlet/JSP combo (MVC)
  • MVC with JSP expression language
  • Custom tags

1.1. MVC - Architecture - 1

>> Wednesday, October 19, 2011

 Web Application Devolopment Models.

Model - 1 Architecture :

Model 1 architecture based web application development is outdated approach of developing web applications. Now a days most of the companies are using MVC architecture to develop the web application. It has become industries defector standard to develop the web applications.

Model 1 architecture based web application multiple web resources will be there but all these web resources will be developed either by using Servlet technology or by using JSP technology.

Using Naming Conventions in Java

>> Tuesday, October 18, 2011

What Is a Naming Convention ?

A naming convention is a rule to follow as you decide what to name your identifiers (e.g. class, package, variable, method, etc..).

Why Use Naming Conventions ?

Different Java programmers can have different styles and approaches to the way they program. By using standard Java naming conventions they make their code easier to read for themselves and for other programmers. Readability of Java code is important because it means less time is spent trying to figure out what the code does, leaving more time to fix or modify it.

Using Debug Tag with an Example

>> Thursday, October 13, 2011


In this article we explained that to send the JSP content of the tag body to the client, one need only call the getJspBody().invoke(null) method inside the doTag method of the tag handler class.

This simplicity allows us to easily create tags that output their bodies conditionally. This functionality can be achieved by simply surrounding the getJspBody().invoke(null) invocation within an if statement.

In this section, we present an example of a custom tag that conditionally outputs its tag body. It's quite often the case when the output of the JSP page is something other than what you expected. In such a case, it's useful to have the option of seeing some debugging information right on the page without having to resort to embedding System.out.print statements throughout the page.

MultiThreading or MultiTasking

>> Saturday, October 8, 2011

Multithreading / MultiTasking:

Let us assume a class containing three functions named as fun1,fun2 and fun3. If all are called once it may take more time to execute. 

In the above example fun2(), fun3() will be executed only after the complete execution of fun1().
Suppose fun1() is performing any input/output operations then at that time processor will be in the ideal state. If input/output operations take 60sec and also fun2() and fun3() will not be executed until 60sec are completed. To overcome this disadvantage the concept of multitasking is used.

There are two types of multitasking techniques.

                1.Process based multitasking
                2.Thread based multitasking


Java program to print word for the given number

Converting a number to characters or to words as readable format in text will be done easily using arrays in java. Based on the given number we can write our logic. But here i am taking the number below to 10000. So we can complete our program easily. But sure, you will understand the logic. It is simple.using Fibonacci logic , using modulo operator and divider operator we can completer our program. This is important interview question and some of like, Reverse an array, matrix addition, matrix multiplication using arrays and prime number logic these are important for the java interviews.
Convert number to Word or Characters_JavabynataraJ
In this program we have to create two arrays one is ones array with the words of one,two,three.....nineteen. Then create another array with tens array contains ten,twenty,.....ninety.
Then write the given logic to convert a number into character.

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2014. All rights reserved.