Title | Lab manual 054 |
---|---|
Author | rythem dixit |
Course | Master of Computer Application(MCA) |
Institution | Indira Gandhi National Open University |
Pages | 31 |
File Size | 251.2 KB |
File Type | |
Total Downloads | 99 |
Total Views | 137 |
labmanual...
For more IGNOU Solved Assignments visit – www.IGNOUHelp.in Get Daily Updates by Facebook: https://www.facebook.com/IGNOUHelp.in MCSL-054 Solved assignment 2013-14
PART-I: Lab for MCS-051 (Advanced Internet Technologies) Question 1: Write a program using Servlet/JSP that accepts the account number of a bank customer as input. The program should print the details of the account. Make necessary assumptions whereever required. Answer.1
1){ ofset = offset*per_page-per_page; }
if((request.getParameter("account_no")!=null) && request.getParameter("account_no")!="") {
String user = session.getAttribute("userid").toString(); String account_no = request.getParameter("account_no"); String sd[] = request.getParameter("sdate").toString().split("-"); String ed[] = request.getParameter("edate").toString().split("-"); String sdate = sd[2]+"-"+sd[0]+"-"+sd[1] ; String edate = ed[2]+"-"+ed[0]+""+ed[1]; Connection conn = null; String url = "jdbc:mysql://localhost:3306/"; String dbName = "userdetails"; String driver = "com.mysql.jdbc.Driver"; String username = "root"; String userPassword = "root"; String color = "#F9EBB3"; try { Class.forName(driver).newInstance();
conn = DriverManager.getConnection(url+dbName,username,userPassword); Statement stcount = conn.createStatement(); String strQuerycount = "select count(*),account_no from transaction where username='"+user+"' and account_no='"+account_no+"' and cdate>='"+sdate+"' and cdate='"+sdate+"' and cdate...