We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 04

Total Marks: 20


Semester: Fall 2016




Web Design and Development -CS506

Due Date: February 1, 2017



Please read the following instructions carefully before submitting assignment:


  • You should submit your assignment before or on due date on VULMS.


  • Your assignment should be your own work in your own words. It should not be copied from internet, handouts or books.
  • Assignment sent via Email will not be replied and accepted in any case.


  • If the submitted assignment does not open or file is corrupt, it will not be marked and awarded Zero marks.



To build knowledge about how to develop basic dynamic web application in Java EE To write first Servlet in Java and communicate with Client using HTTP


Install, configure and use Apache Tomcat Server in Java Web Application


For any query about the assignment, contact at CS506@vu.edu.pk

Question:                                                                                                                                   Marks 20

You are required to develop an HTML page using Microsoft Notepad that will work as a client to interact with Java Servlet. The HTML page will be a Student Registration From containing basic HTML controls. The sample is as follows;



























One Server side, you need to write Java Servlet named as “StudentServlet” which will dynamically respond to previously developed HTML form.


Your servlet should check all HTML controls (i.e. text fields, radio buttons, drop down lists etc.) for non-empty values and display a response message to user like;

Congrats Registration Successful !

Thanks Mr. Ali Ahmad


(where Ali is the name of user)


Note: You need to install, configure, environment setup and test following softwares in your machine;


  1. Java SE
  2. Java Servlet Libraries (servlet-api.jar and jsp-api.jar) OR Apache Tomcat Web Server


You are also required to submit both HTML form and “StudentServlet.java” files. You can zip both files together and upload on VULMS.




+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 8517


Replies to This Discussion

Code ko copy kar , notepad py save krwaye .html extension k sath phir run hga

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....



form ban gya ha baki ka jo kam ha please koi wo smjha dy k kaisy or kia krna ha ?? .xml extention ki file banani ha kia??

kia me dreamviewer me bana sakti hn ye javaservlet wali file??

yes dreamviewer text editor hen code likh skte ap us me. 

diamond sir can u plz explain how to do it.... in simple words

ksi be software pe bana skti hia aap bs ban janne k bad, compile kar k zarorr dekhye in order to see k koi exception or error toh nhi arah.

Web applications with Java - Tutorial 02 - Servlet + Basic HTML Form


insight of dopost 

 String fname = request.getParameter("fname");

 String lastName = request.getParameter("lastname");

 String gender = request.getParameter("gender");

 String email = request.getParameter("email");

 String courses = request.getParameter("course");

 if(name != null ) out.println("<h2> Hello, "+fname+"</h2>");

  same as above just check each variable for null. and then print.














url pattern can be differ according to your form action="./url"


Looking For Something? Search Here

Latest Activity


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service