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.

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.

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