Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet jsp code for dynamic time table generation

Have Programming Question? Ask it here!
 
 
 


raghavendra
jsp code for dynamic time table generation
1 Answer(s)      4 years and 2 months ago
Posted in : JSP-Servlet


hi
I am doing my academic project college automation.
I want to generate time table dynamically for each btech and mca,mba branches.Pls provide a solution how to process this requirement.

pls...

Advertisement
View Answers

June 5, 2010 at 1:18 PM


Hi Friend,

Try the following code:

<%@page import="java.sql.*"%>
<%String course=request.getParameter("course");%>
<html>
<script>
function get(course){
var val =course.options[course.selectedIndex].text;
window.location.replace("timetable.jsp?course="+val);
}
</script>
<form name="form">
<select name="course" onchange="get(this);">
<option >Select</option>
<option value="BTech">BTech</option>
<option value="MBA">MBA</option>
<option value="MCA">MCA</option>

</select>
</form>
<%
if(course!=null){
%>
<h2>TIMETABLE</h2>
<h4><font color="red"><%=course%></font></h4>
<table border="1">
<tr bgcolor="red"><th>Days</th><th>I</th><th>II</th><th>III</th><th>IV</th><th>V</th><th>VI</th><th>VII</th><th>VIII</th></tr>
<%
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root";, "root");
Statement st=connection.createStatement();
ResultSet rs=st.executeQuery("select * from "+course);
while(rs.next()){
%>
<tr><th bgcolor="red"><%=rs.getString("days")%></th><td><%=rs.getString("1")%></td><td><%=rs.getString("2")%></td><td><%=rs.getString("3")%></td><td><%=rs.getString("4")%></td><td><%=rs.getString("5")%></td><td><%=rs.getString("6")%></td><td><%=rs.getString("7")%></td><td><%=rs.getString("8")%></td></tr>
<%
}
}
catch(Exception e){}
%>
</table>
<%
}
%>


For the above code, we have created three database tables

1)btech:

CREATE TABLE `btech` (
`days` varchar(255) default NULL,
`1` varchar(255) default NULL,
`2` varchar(255) default NULL,
`3` varchar(255) default NULL,
`4` varchar(255) default NULL,
`5` varchar(255) default NULL,
`6` varchar(255) default NULL,
`7` varchar(255) default NULL,
`8` varchar(255) default NULL
)
2)mba:

CREATE TABLE `mba` (
`days` varchar(255) default NULL,
`1` varchar(255) default NULL,
`2` varchar(255) default NULL,
`3` varchar(255) default NULL,
`4` varchar(255) default NULL,
`5` varchar(255) default NULL,
`6` varchar(255) default NULL,
`7` varchar(255) default NULL,
`8` varchar(255) default NULL
)

3)mca:

CREATE TABLE `btech` (
`days` varchar(255) default NULL,
`1` varchar(255) default NULL,
`2` varchar(255) default NULL,
`3` varchar(255) default NULL,
`4` varchar(255) default NULL,
`5` varchar(255) default NULL,
`6` varchar(255) default NULL,
`7` varchar(255) default NULL,
`8` varchar(255) default NULL
)

Thanks


Related Tutorials/Questions & Answers:
jsp code for dynamic time table generation - JSP-Servlet
jsp code for dynamic time table generation  hi I am doing my academic project college automation. I want to generate time table dynamically... For the above code, we have created three database tables 1)btech: CREATE TABLE
Time table generation
in the time table is there any calculations possible to do this work? The code you...Time table generation  Hi I am 3rd year bca student i want create time table generator for my project.i am going to create it as school time table
Advertisements
Time table generation
Time table generation  Hi I am 3rd year bca student i want create time table generator for my project.i am going to create it as school time table...: Generate TimeTable using JSP
Dynamic table in jsp
Dynamic table in jsp  Hi..... I have a java file to read excel file... to show all values of excel file on jsp page in a table format. All elements are displaying on jsp page but in vertical line. How can i change them in table
jsp code for date generation - JSP-Servlet
jsp code for date generation  hai i am meyis i need a jsp program code for date generation.(mssql-back end) Fields are fromdate and todate both... thanks   Hi friend, For more information on Date in JSP
Dynamic table data to Excel in JSP
Dynamic table data to Excel in JSP   Iam trying to export dynamic...() { document.form1.des.disabled=0; } function view_Table() { } function...;div align="center"><br> <table width="500" height="300
Play framework dynamic form generation
Play framework dynamic form generation  I want to generate dynamic forms using play framework can any one give me some idea about dynamic form generation using play framework
generating time table - JSP-Servlet
..the code should be in jsp/servlet.. so please help me friends...generating time table  hi friends, i want generate examination timetable for examinations of courses like btech(cse,ece,eee..etc),if i give starting
Table generation error - EJB
Table generation error  Hi friends I am using EJB3.0 with sun java... an EJB it gives the following exception and doesnt generate any table... "CREATE TABLE BookShop (ID INTEGER NOT NULL, BOOKNAME VARCHAR(255), AUTHOR VARCHAR
report generation using jsp
report generation using jsp  report generation coding using jsp
dynamic retrivel of data from mysql database in table format at jsp
dynamic retrivel of data from mysql database in table format at jsp  ... the data from database and display it as table format in jsp... For example, i have... and also details of each member should be displayed in the table format in jsp
Dynamic retrieval od data from database and display it in the table at jsp
Dynamic retrieval od data from database and display it in the table at jsp ... the details of 20 members in a table format at jsp page by dynamically retrieving...; Here is a jsp code that retrieves the data from the database and display
jsp code for storing login and logout time to an account
jsp code for storing login and logout time to an account  I need simple jsp code for extracting and storing login and logout time in a database table...://www.roseindia.net/jsp/loginstatus.shtml
dynamic generation of html:select tag from textbox value
dynamic generation of html:select tag from textbox value  Hi, I am a newbie to java and struts. In my application, I have a requirement like when i... action class? And i have no idea how to implement this. I am using jsp. Any help
Date Time Problem In Jsp code - Development process
Date Time Problem In Jsp code  Hi Friends, By using this code , am storing date and time into msaccess database. But while retriving i want to get same date and time .send me code for that. SimpleDateFormat
dynamic generation of html:select tag from textbox value
dynamic generation of html:select tag from textbox value  Hi, I am a newbie to java and struts. In my application, I have a requirement like when i give some input in a textbox and click on a add link. It should be added
how to insert value in dynamic table
a dynamic table for every company.but whenever i'm inserting values to the company sql server showing a syntax error. my code is as follows:- PreparedStatement ps1...how to insert value in dynamic table  i am creating a project
code for image to key generation - JDBC
code for image to key generation  plz help me how cud i convert image into key using sha1 algorithm in java.... plz give me the code to write it... i m doing image based registration
How to add dynamic table in java
How to add dynamic table in java  How to add dynamic table in java...(); } catch(Exception e){ System.out.println(e); } JTable table = new JTable(data...); } JScrollPane scrollPane = new JScrollPane( table ); p.add( scrollPane ); JFrame f=new
Dynamic include jsp
Dynamic include jsp  I need dynamic include jsp page with an example
Create Dynamic Table using Hubernate
Create Dynamic Table using Hubernate  Thank's for reading my Post. I...: How to create seperate table for all users they sign up for my web app. i need to create 2 table's 1.User Details - Store user mail address,username
Time Table in Java
Time Table in Java  Hi, Deepak i am developing a time table for a school on java,but i am confuse how to start so please give me idea about
jsp program for bill generation - JSP-Servlet
jsp program for bill generation  hi, i just want to know how i write the jsp program for generation of bill for a gas connectivity systm  Hi Friend, Please provide some information like structure of bill. Thanks
JSP: Dynamic Linking - JSP-Servlet
inside your result set loop to provide them a dynamic link. JSP Code...JSP: Dynamic Linking  Hi I am fetching data as a search result from database and displaying it in a table(id and name)using while(rs.next()){...}.I
Dynamic link in JSP
Dynamic link in JSP  Hii everyone...I have stuck from last 2 days... selecting One source and multiple Targets, i have to generate one table using... jsp page which contains some checkboxes, so from that checkboxes , i have
JSP:Dynamic Linking - JSP-Servlet
JSP:Dynamic Linking  Hi This is extension to my previous question... it in a table(id and name)using while(rs.next()){...}.I want to provide hyper link... friend, Code to help in solving the problem : "view1.jsp" All
Insert value of dynamic generated text box in jsp using javascript
Insert value of dynamic generated text box in jsp using javascript  hello sir , i want to generate dynamic text box at run time and i did that using... dynamically at the same time without reloading the page here is the code that i am
dynamic display - JSP-Servlet
dynamic display  hi, i want to display dynamic values in drop drown box in a jsp page.these values are in the form of arraylist's object which... Friend, Try the following code: 1)DataServlet.java: import java.io.
Dynamic Line draw in JSp
Dynamic Line draw in JSp  In my application. I have one source selected from listbox and multiple targets selected from checkboxes. After submitting... multiple target. And each line should have dynamically link of other jsp page
dynamic pagination in jsp - JSP-Servlet
dynamic pagination in jsp  i am unable to display the data in multiple pages. I am gettting data from the database from the javaBeans to jsp by vectors... but i am unable to displaying them in jsp 15 records per page
Dynamic row genertion in javascript? - JSP-Servlet
Dynamic row genertion in javascript?  Hi roseindia, I want coding in javascript to add a dynamic row in jsp..This row contain 3 fields(2..., Use the following code: function addRow(tableID){ var table
java with jsp and dynamic database retrival for bar charts
java with jsp and dynamic database retrival for bar charts  Hi, I am having a table name tablelogin,it consists of columns userid,logintime... dynamically for the table values logintime and userid from database.. can u please
Time series sorce code
Time series sorce code   hi.......... I want to show the output of my project as time series. Can u give me a simple code for time series. Where i amble able to put on x-axis the date and y-axis the range.? I require the time
Time series sorce code
Time series sorce code   hi.......... I want to show the output of my project as time series. Can u give me a simple code for time series. Where i amble able to put on x-axis the date and y-axis the range.? I require the time
Creating dynamic jsp file in java file to include another jsp file
Creating dynamic jsp file in java file to include another jsp file  I am able to create jsp file in java that includes ; table tr td and img tags..... Need to include jsp file in the same content. The below code doesn't help me
html report generation in emma code coverage using ANT acript
html report generation in emma code coverage using ANT acript  Hi Deepak, I am using emma code covarage tool and to generate coverage report...(StreamDecoder.java:316) i have written the following code in build.xml
dynamic multiplecheckbox values insertion - JSP-Servlet
dynamic multiplecheckbox values insertion  hi How to insert dynamically generated checkbox values to store in mysql data base using jsp?  Hi Friend, Try the following code: 1)checkbox.jsp: Name
Create dynamic page through JSP
Create dynamic page through JSP       This is detailed jsp code that shows how to create dynamic page. This code shows one by one record of student from
JSP date example
, now I will show you how to create a simple dynamic JSP page that prints the current date and time. So the following code accomplish... JSP date example      
Displaying database table on the windows screen in real time.
Displaying database table on the windows screen in real time.  Problem statement... I have a database table which is running on a remote host .I need to write a program to display this table in a windows form or on a html page
resize dynamic image in jsp - JSP-Servlet
resize dynamic image in jsp  Sir, I am saving the images in mysql database with Blob. An I am retrieving the images with this code:- I am getting my image with this code but all I need that I want to resize
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's field....  my project has customer registration and company registration........ pls provide me code.. thanx
How to Extract row from table view using JSP Code - Java Beginners
How to Extract row from table view using JSP Code  Hi Friends...)deleteuser.jsp: For the above code, we have used following database table... problem exist with retrival of row from a table on click of link. Table Structure
JSP Date & Time - JSP-Servlet
JSP Date & Time  Hi! How to compare a String with System time in JSP.... pls... help me... Thanks in advance
Download dynamic link files to local directory - java code
Download dynamic link files to local directory - java code  Hi, I found a code that downloads static links but not dynamic link files.can anyone give a solution for downloading dynamic link files? Thanks in advance
how to set time in jsp page
how to set time in jsp page   I need code for set the time in jsp code .iam using struts frame work back end oracle 10g ide is eclipse 6.0
how to upload a student time table excelsheet
how to upload a student time table excelsheet   Hi good morning iam... end as java .in my student module i have time table so how to upload excelsheet time table or is it possible maintain dynamically plz help me.   
Bus Time Table in Java - Development process
Bus Time Table in Java  I want mini project for Bus timeTable in Java.please give me  Hi Friend, Try the following code: import...(); l1=new JLabel("Bus No:"); l2=new JLabel("Source:"); l3=new JLabel("Time
Advertisements
 

 

 

DMCA.com