I'm trying to make a program for room renting service, where I'm capturing the information of whole building as per the user input..
I'm restricted to use
Servlet and
JSP, I'm stuck in this program for long....
Here is my sample code to understand the logic..
Thanks in advance..
<h1>Enter The Details of Your property</h1>
<form action="property_register" method="post">
<table style="with: 50%">
<tr>
<td>Floor Number</td>
<td><input type="text" name="Floor_num" /></td>
int Floor_num = input.nextInt();
String Floor_numArray[] = new String[Floor_num];
input.nextLine();
for(int i = 0; i < Floor_numArray.length; i++)
{
<td>Total Room</td>
<td><input type="text" name="Total_room" /></td>
for(int i = 0; i < Floor_numArray.length; i++)
{
int Total_room = input.nextInt();
String Total_roomArray[] = new String[Total_room];
input.nextLine();
for(int j=0; j<Total_roomArray.length; j++)
{
<td>Rent Per Month</td>
<td><input type="text" name="Rent_perMonth" /></td>
int Rent_perMonth = input.nextInt();
String Rent_perMonthArray[] = new String[Rent_perMonth];
input.nextLine();
<td>Rent Per Day</td>
<td><input type="text" name="Rent_perDay" /></td>
int Rent_perDay = input.nextInt();
String Rent_perDayArray[] = new String[Rent_perDay];
input.nextLine();
<td>Enter the Deposit</td>
<td><input type="text" name="Deposit" /></td>
int Deposit = input.nextInt();
String depositArray[] = new String[Deposit];
input.nextLine();
<td>Available From</td>
<td><input type="text" name="Available_from" /></td>
int Available_from = input.nextInt();
String Available_from Array[] = new String[Availablr_from];
input.nextLine();
}
}
}