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:
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;
You are also required to submit both HTML form and “StudentServlet.java” files. You can zip both files together and upload on VULMS.
BEST OF LUCK
+ 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)
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"