Click here to Skip to main content
15,313,293 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have created login user and password in jsp using textfile (not used database) and i have a form for room booking ,once the room booked by one user it should not be booked by the next user who login the web app .please tell me how to proceed without using database.please help me as im new to programming

What I have tried:

ASP.NET
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

body {background-color: powderblue;}
 



 <%
 response.setHeader("Cache-Control","no-cache,no-store,must-revalidate" );
 
 if(session.getAttribute("username")==null)
{
	response.sendRedirect("LoginPage.jsp");
}
 %>
 







<br>
  <br>

  
  

  



  <table cellpadding="2" width="20%" align="center" cellspacing="2"><tbody><tr>  <td colspan="2">  <center><font size="4">BOOKING  FORM</font></center>

  </td>  </tr><tr>  <td>NAME</td>  <td></td>  </tr>  <tr><td>EMPID</td>  <td></td>  </tr><tr>  <td>EMAILID</td>  <td></td>  </tr><tr>  <td>PROJECT</td>  <td>

  CITI

  BOA

  SBI

  BMW

  AUDI

  </td>  </tr><tr>  <td>FLOOR</td>  <td>

 

  one

  two

  

  </td>  </tr>  <tr>  <td>ROOMS</td>  <td>

  16 seater

   8 seater

  

  </td>  </tr><tr><td>MobileNo</td>  <td></td>  </tr>  <tr>  <td></td>  <td colspan="2"></td>  </tr>  </tbody></table>
Posted
Updated 24-Oct-17 9:43am
v2

1 solution

Quote:
please tell me how to proceed without using database.

Bad idea, the reason why everyone use databases is because they are efficient.
If you have 50 rooms, 1 year of booking can be 18000 records, and you will have to read every single record for every single request, even worse every time you write a new record, you will have to lock the file, problem, it will prevent others from accessing that data. Believe me, it is not efficient.
So the advice is to learn databases as soon as possible.

Quote:
please help me as im new to programming

Advice: Forget real projects for now and take time to learn properly.
Find tutorials and study.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900