hi everyone, i am new to netbeans. i am creating a system that can allocate rooms to students. My main problem is how to find out which rooms are full and which ones are available.
I am using Mysql and Java Netbeans. I have read some of the tutorials but i haven't fond out how i can do it.
does anyone know how i can do this in netbeans. Please help
That is not a good example and it is a bad way to do things. Not to mention that the OP said nothing about html code.
Only the database connectivity is almost ok. You forgot to close the ResultSet, Statement and ResultSet.
First: How do you know that the table entered at the field will always have 2 columns.
Second: Never put html code in servlets. Read the data from the DB, put those into an array of objects using OOP, and then send the array of objects back to a jsp through the request in order to be displayed at the jsp page.
Of course the above would have been helpful if the OP has said that the whole application would be web application.
Of course, first you have to create the database and store it in the your Java file. You can develop MySQL backed applications with Netbaens and JAVA which might could give you the other Web services. It would be easier for you if you create the proper database so that you can allocate rooms to the students.
I want a code in which a jsp login page is calling a servlet and the server is connected to the again new jsp in which it shows the welcome page or it says that you are a valid user or it may be invalid user....plz ans as soon as possible,