Assume that we have got three pdf files for the MCA-1 Syllabus, MCA-2 Syllabus and MCA-3 Syllabus respectively, Now write a Servlet which displays the appropriate PDF file to the client, by looking at a request
parameter for the year (1, 2 or 3).
Hint: Create a HTML pages which will have a textbox and
button. The user will enter the values in the textbox –
either 1,2,3. Pass the value to a servlet page which will
read the parameter value and display the appropriate
PDF file. If the option is invalid they just display the
message invalid semester.
Note: You can use any method – GET or POST
Step 1: Create HTML Page which will have a textbox and button.
which can pass value to servlet page.
Step 2: Create ViewPdf.java servlet file which can interact with pdf files and display it.
which can pass value to servlet page.
Step 2: Create ViewPdf.java servlet file which can interact with pdf files and display it.
Step 3: Create WEB.XML file for Mapping Servlet file.
No comments:
Post a Comment