Mcsl-054 Laboratory Course

Only available on StudyMode
  • Download(s) : 360
  • Published : March 4, 2012
Open Document
Text Preview
Course Code Course Title Assignment Number

: : :

MCSL-054 Laboratory Course MCA(5)/L054/Assign/2011

Question 1: Write a Servlet program for session tracking using cookies. Hint : package hall; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.net.*; import java.util.*; public class ShowSession extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(true); response.setContentType("text/html"); PrintWriter out = response.getWriter(); String title = "Searching the Web"; String heading; Integer accessCount = new Integer(0);; if (session.isNew()) { heading = "Welcome, Newcomer"; } else { heading = "Welcome Back"; Integer oldAccessCount = (Integer)session.getValue("accessCount"); if (oldAccessCount != null) { accessCount = new Integer(oldAccessCount.intValue() + 1); } } // Use putAttribute in version 2.2 of servlet API. session.putValue("accessCount", accessCount); out.println(ServletUtilities.headWithTitle(title) + "\n" + "" + heading + "\n" + "Information on Your Session:\n" + "\n" + "\n" + " Info TypeValue\n" + "\n" + " ID\n" + " " + session.getId() + "\n" + "\n" + " Creation Time\n" +

" " + new Date(session.getCreationTime()) + "\n" + "\n" + " Time of Last Access\n" + " " + new Date(session.getLastAccessedTime()) + "\n" + "\n" + " Number of Previous Accesses\n" + " " + accessCount + "\n" + "\n" + ""); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }

Question 2: Write a JSP Program, which displays a web page containing two web links one for showing details of your Study Centre and other for FAQs on Practicls in MCA Programme . When one click on link Study Centre it goes to a page which shows all the details of study centre and counselling schedule for MCA students .Clicking on link for FAQs on Practicls in MCA ,another JSP page consisting of some FAQ related to different practical courses in MCA, will open. Hint : Main.jsp Main View Details of study center View Faq on MCA Practils

detailofstudycenter.jsp

Student Centre Detail Page: Study Centre Name : Solutioncab Technologies Address : Solutioncab technologies, jaipur Rajasthan Phone Number : 0141-25699002 Email : solutioncab@gmail.com Program Coordinator : Praveen kumar counselling schedule for MCA : click here
faqonpracticls.jsp FAQs FAQs on Practicls Q1. If attendance is less than 75% in practical session of a course due to some reasons can student get any help/consideration? Ans : The student will NOT be allowed to appear in Term-End Practical Exam.

Q2. If Attendance is less than 75% then how can a student give Term-End Practical Exam? Ans : The student will NOT be allowed to appear in Term-End Practical Exam. Q3. Can the MCA students appear in the Term-End Practical Exam without filling the TermEnd Exam Form ? Ans : No. Q4. What should we do to give my Backlog Term End Practical Exam ? Ans : Collect attendance proof from the study Centre & then submit to IGNOU Regional Centre before your Term End Examination (Theory).

Question 3:Write a program using JSP and JDBC to provide details of MCA/BCA/CIT study centres in your regional centre of IGNOU. This program should provide the list of students in different semesters of MCA/BCA/CIT. Hint: index.jsp Select your regional center Please select one



page2.jsp JSP Page Back Student details for different semester(MCA,BCA and CIT) regional center wise Study center details Id Name Address

page3.jsp

JSP Page Back Student details Id Name Gender Age Address Course Semester page4.jsp

JSP Page Back Student details Id Name Gender

Age Address Course Semester

DBConnection.java package...
tracking img