how to generate timetable

how to generate timetable

View Answers

June 22, 2009 at 12:47 PM

Hi Friend,

We are providing you a code that will display three courses examination list.For this, we have used a database and created four tables, ExaminationList(from_date,to_date,Course),btech(date,subject),mca(date,subject) and mba(date,subject).

If you want to add more courses, you need to create more tables.

1) form.jsp:

<html>
<body>
<form name="userform" method="post" action="display.jsp">
<table>
<tr><td>From Date (yyyy-mm-dd):</td><td><input type="text" name="date1"></td></tr>
<tr><td>To Date(yyyy-mm-dd):</td><td><input type="text" name="date2"></td></tr>
<tr><td><input type="submit" value="Search"></td></tr>
</table>
</form>
</body>
</html>

2) display.jsp:

<%@page import="java.sql.*"%>
<%
String fdate=request.getParameter("date1");
String tdate=request.getParameter("date2");
Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://192.168.10.211:3306/test","dracplatformdev";, "dracplatformdev");
ResultSet rs = null;
Statement st=null;
st=conn.createStatement();
rs = st.executeQuery("select * from ExaminationList where from_date='"+fdate+"' and to_date='"+tdate+"'");
String co="";
while(rs.next()){
co=rs.getString("course");
}
%>
<table border="1">
<%
if(co.equals("Btech")){
rs = st.executeQuery("select * from btech");
while(rs.next()){
%>
<tr><td><%=rs.getDate("date")%></td><td><%=rs.getString("subject")%></td></tr>
<%}
}
if(co.equals("MCA")){
rs = st.executeQuery("select * from mca");
while(rs.next()){
%>
<tr><td><%=rs.getDate("date")%></td><td><%=rs.getString("subject")%></td></tr>
<%}
}
if(co.equals("MBA")){
rs = st.executeQuery("select * from mba");
while(rs.next()){
%>
<tr><td><%=rs.getDate("date")%></td><td><%=rs.getString("subject")%></td></tr>
<%}
}
%>
</table>

Thanks









Related Tutorials/Questions & Answers:
how to generate timetable - JSP-Servlet
how to generate timetable  can i have a jsp/servlet code for generating timetable for examinations for university like courses btech,cse ece etc... By giving starting date and ending date it will automatically generate
timetable generation - JSP-Servlet
timetable generation  i want to generate college timetable which is web based which contains courses(B.Tech,MCA,M.Tech),subjects,faculties.i need code.can anyone help me
Advertisements
TIMETABLE - Java Beginners
TIMETABLE  I want to do project for timetable generation for our college. so i dont know how generate.. please some one help me..  Hi Friend, Please specify what do you want to display on your time table and on which
ModuleNotFoundError: No module named 'timetable'
'timetable' How to remove the ModuleNotFoundError: No module named 'timetable' error? Thanks   Hi, In your python environment you...ModuleNotFoundError: No module named 'timetable'  Hi, My Python
how to generate auto code ?
how to generate auto code ?  i wanna genrate auto code for id in core java. pls tell me code of auto genrate
School Timetable System in java spring mvc 3
School Timetable System in java spring mvc 3  I want to do project in timetable generation for my project. but i dont know how generate. i'm using java spring Hibernate. please some one help me. Thanks thuva
how to generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
how to generate udp packets in linux
how to generate udp packets in linux  Hi, For testing one of my application I want to send udp data. how to generate udp packets in linux? Thanks...;Hi, Thanks it works. I was searching for "how to generate udp packets in linux
how to generate udp packets in linux
how to generate udp packets in linux  Hi, For testing one of my application I want to send udp data. how to generate udp packets in linux? Thanks...;Hi, Thanks it works. I was searching for "how to generate udp packets in linux
How to generate XML from XSD?
How to generate XML from XSD?  Hi Experts, I have a xsd with me. I want to generate XML files based on the XSD with fields filled out from the database tables. Please Help me out
ModuleNotFoundError: No module named 'django-timetable'
named 'django-timetable' How to remove the ModuleNotFoundError: No module named 'django-timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'django-timetable'  Hi, My
ModuleNotFoundError: No module named 'django-timetable'
named 'django-timetable' How to remove the ModuleNotFoundError: No module named 'django-timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'django-timetable'  Hi, My
ModuleNotFoundError: No module named 'django-timetable'
named 'django-timetable' How to remove the ModuleNotFoundError: No module named 'django-timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'django-timetable'  Hi, My
ModuleNotFoundError: No module named 'RayQT-Timetable'
named 'RayQT-Timetable' How to remove the ModuleNotFoundError: No module named 'RayQT-Timetable' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'RayQT-Timetable'  Hi, My
ModuleNotFoundError: No module named 'ssu-timetable'
'ssu-timetable' How to remove the ModuleNotFoundError: No module named 'ssu-timetable' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'ssu-timetable'  Hi, My
ModuleNotFoundError: No module named 'timetable-tool'
named 'timetable-tool' How to remove the ModuleNotFoundError: No module named 'timetable-tool' error? Thanks   Hi, In your python...ModuleNotFoundError: No module named 'timetable-tool'  Hi, My
ModuleNotFoundError: No module named 'uaviak_timetable'
named 'uaviak_timetable' How to remove the ModuleNotFoundError: No module named 'uaviak_timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'uaviak_timetable'  Hi, My
ModuleNotFoundError: No module named 'uaviak_timetable'
named 'uaviak_timetable' How to remove the ModuleNotFoundError: No module named 'uaviak_timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'uaviak_timetable'  Hi, My
ModuleNotFoundError: No module named 'django-timetable'
named 'django-timetable' How to remove the ModuleNotFoundError: No module named 'django-timetable' error? Thanks   Hi, In your...ModuleNotFoundError: No module named 'django-timetable'  Hi, My
how to generate code - Java Beginners
how to generate code   hi friends, this is poornima i want to generate code about online shopping by using servlets,jsp,html,jdbc and eclipse (IDE) could you please tell me about what are steps included. Thanks in advance
How to generate a list of random numbers?
How to generate a list of random numbers?  Hi, How to generate a list of random numbers? I want code in scala programming language. Thanks   HI, You can use the code: Seq.fill(10)(Random.nextInt) This is example
How to generate a list of random numbers?
How to generate a list of random numbers?  Hi, How to generate a list of random numbers? I want code in scala programming language. Thanks   HI, You can use the code: Seq.fill(10)(Random.nextInt) This is example
How to generate a list of random numbers?
How to generate a list of random numbers?  Hi, How to generate a list of random numbers? I want code in scala programming language. Thanks   HI, You can use the code: Seq.fill(10)(Random.nextInt) This is example
how to generate pdf file in struts
how to generate pdf file in struts  I am developing a struts application.I am having one registration form when i am submitting the form the values are stored in database,the database name is registration. In another form i am
how to generate pdf file in struts
how to generate pdf file in struts  I am developing a struts application.I am having one registration form when i am submitting the form the values are stored in database,the database name is registration. In another form i am
How to generate build.xml file
How to generate build.xml file       This example shows how to generate the build.xml file. You may say that build.xml file is the backbone of ANT (Another Neat Tool
How to Generate Reports in Java - Java Beginners
How to Generate Reports in Java  How to Display and Generate Reports in Java? Give Me Full Sample Code  Hi Friend, What do you want to display on reports.Please elaborate it. Thanks
ModuleNotFoundError: No module named 'odoo9-addon-openeducat-timetable'
: ModuleNotFoundError: No module named 'odoo9-addon-openeducat-timetable' How to remove the ModuleNotFoundError: No module named 'odoo9-addon-openeducat-timetable'...ModuleNotFoundError: No module named 'odoo9-addon-openeducat-timetable
ModuleNotFoundError: No module named 'apu-timetable-telegram'
: No module named 'apu-timetable-telegram' How to remove the ModuleNotFoundError: No module named 'apu-timetable-telegram' error? Thanks   Hi...ModuleNotFoundError: No module named 'apu-timetable-telegram'  Hi
How do I generate random number?
How do I generate random number?  In my Java program there is a requirement of generating random numbers between two given numbers. How do I write..., The java.util.Random class can be used to generate the random numbers. Check the tutorial
how to generate the pdf report from jsp
how to generate the pdf report from jsp  <%@page import="com.itextpdf.text.,com.itextpdf.text.pdf.,java.io.*;"%> </head> <... want to generate the pdf file from jsp page.I add the itext.jar to the libraries
How to generate xml file using xpath
How to generate xml file using xpath  Hi, I have a requirement in whixh I have x path of all the nodes with its corresponding values and I need to make a xml using that,. It would be great is you can help me out with how
how to generate captcha in jsp page ? - JSP-Servlet
how to generate captcha in jsp page ?  hi friends, i would like to implement Captcha in login screen. i'm unsing struts. could you please give some sample codes to implement this. Thank you Ganesh  Hi, This link
how to generate random questions - Java Beginners
how to generate random questions  i am designing a test engine, i want my questions to be generated randomly. how can i do this?   Hi friend, Plz specify the technology with full details like Java,JSP,Servlet,ASP
How to generate the pdf file using jsp - JSP-Servlet
How to generate the pdf file using jsp  Hi how to generate the pdf file in jsp  Hi Friend, Try the following code: Thanks
how to generate automatic bill based on selected values using jsp/javascript?
how to generate automatic bill based on selected values using jsp/javascript?  how to generate automatic bill based on selected values using jsp/javascript
New Delhi to Agra by Train - Timetable
New Delhi to Agra by Train - Timetable  Hi, can anyone please provide me the timetable of Delhi to Agra Trains..? Thanks
How to generate random number in java
How to generate random number in java In this section you will learn how to generate random number in java. Java API  provide a random class in java.util.Random package which generate random number within a range. The random
how to generate the pdf file with scroolbar from jsp age - JSP-Servlet
how to generate the pdf file with scroolbar from jsp age  How to generate the pdf file with scroolbar from jsp.i am not able to see the all the columns in pdf file now .it is very urgent for me plz help
generate file
generate file  How to generate file(.doc or .xls or .txt ) with containing data in it.By clicking on a link
How to generate hash code of Zip file.
How to generate hash code of Zip file. In this tutorial, we will see how to generate hash code of zip file entries. The ZipFile   class is used to read entries of zip files. The entries() methods of ZipFile class 
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp
How to generate reports dynamically using ireports tool in a web application
How to generate reports dynamically using ireports tool in a web application  Hi all, As part of my web application , i need to generate reports... to generate it dynamically, I mean i have to pass from_ date and to_date from a jsp

Ads