Powered by Blogger.

Basic Struts Login Application

>> Sunday, December 18, 2011

 This is our first Application on Struts for Beginners. Before going to start our application go through the Struts flow and architecture.

These are the required files to Develop Struts Login Application:
  1. register.jsp
  2. success.jsp
  3. failure.jsp
  4. RegisterAction.java
  5. RegisterForm.java
  6. struts-html.tld
  7. web.xml
  8. struts-config.xml
Project Structure:
Basic Struts Login Application Project Structure

Create the jsp files first what you want to display as a home page and resultant pages.

Read more..

Prime Number Logic

>> Sunday, December 11, 2011

The Prime Number program logic is simple but some times we can't catch immediately. In many interviews candidates will discuss each other about this logic. Here given as simply to understand the main logic.

In this program we use two 'for' loop. For loop will start from 1 to entered number. And another loop will start and divide it from 2 to less than those number. If number is divided by any number that means it is not prime otherwise prime number.

In this first for look the values repeat up to the given number 'num'. After it check the prime number logic.
The program given below.

Read more..

How does the ternary Operator Works?

>> Tuesday, November 15, 2011

The Ternary Operator contains three operands with
  "? :". Based on the return type it will give the value.

operand1 ? operand2 : operand3

Ternary Operator Syntax:

boolean expression ? value1 : value2 ;

The first operand is a boolean expression; if the expression is true then the value of the second operand is returned otherwise the value of the third operand is returned:

Here if operand1 is true, operand2 is returned.

operand1 must be a boolean type

Read more..

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

Read more..

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.

Read more..

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.

Read more..

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