SlideShare a Scribd company logo
1 of 4
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
ASSIGNMENT
PROGRAM BSc IT
SEMESTER FOURTH
SUBJECT CODE & NAME BT0083,Server Side Programming-Theory
CREDIT 4
BK ID B1088
MAX.MARKS 60
Q1.Define and explainwebservers and applicationservers.
Answer: A Web server exclusively handles HTTP requests, whereas an application server serves business
logicto applicationprograms throughanynumberof protocols.
Let's examine eachinmore detail.
The Webserver
A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds
with an HTTP response, such as sending back an HTML page. To process a request, a Web server may
respond with a static HTML page or image, send a redirect, or delegate the dynamic response
generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active
Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose,
such server-side programsgenerate aresponse,mostofteninHTML,for viewinginaWebbrowser.
Q2 ExplainServletmethodsused to retrieve data from HTML form. Give an examples.
Answer:HandlingformdatarepresentedinHTML page is a verycommontask inwebdevelopment.A
typical scenarioisthe userfillsinfieldsof aformand submitsit.The serverwill processthe request
basedon the submitteddata,andsendresponse backtothe client.The followingpicture depictsthat
workflowwithJavaservletonthe serverside:
Q.3 Describe the followingexceptionhandlingmethodsina servlet withthe helpof examples
1. Usingthe web.xml file
2 Usinga RequestDispatcher
1. Usingthe web.xml file
Answer: When a servlet throws an exception, the web container searches the configurations in web.xml
that use the exception-typeelementforamatch withthe thrownexceptiontype.
We would have to use the error-page element in web.xml to specify the invocation of servlets in
response to certain exceptions or HTTP status codes. Consider, you have an ErrorHandler servlet which
would be called whenever there is any defined exception or error. Following would be the entry created
inweb.xml.
Q2 Usinga RequestDispatcher
Answer: The Request Dispatcher interface provides the facility of dispatching the request to another
resource it may be html, servlet or jsp. This interface can also be used to include the content of another
resource also.Itis one of the wayof servletcollaboration.
There are two methodsdefinedinthe Request Dispatcherinterface.
Forward method:
Q.4 Explainthe two JSP architectures.
Answer: - The JSP specification presents two approaches for building web applications using JSP pages:
JSP Model 1 and Model 2 architectures. These two models differ in the location where the processing
takes place. In Model 1 architecture, the JSP page is responsible for processing requests and sending
back repliestoclients.
The Model 2 architecture, integrates the use of both servlets and JSP pages. In this mode, JSP pages are
used for the presentation layer, and servlets for processing tasks. The servlet acts as a controller
responsible for processing requests and creating any beans needed by the JSP page. The controller is
also responsible for deciding to which JSP page to forward the request. The JSP page retrieves objects
createdby the servletandextractsdynamiccontentforinsertionwithinatemplate.
Thismodel promotesthe use of the Model View
Q5. Draw and explainthe diagram of custom tag life cycle.
Answer: The life cycle of a JavaServer Faces page is somewhat similar to that of a JSP page: The client
makes an HTTP request for the page, and the server responds with the page translated to HTML.
However, the JavaServer Faces life cycle differs from the JSP life cycle in that it is split up into multiple
phases in order to support the sophisticated UI component model. This model requires that component
data be converted and validated, component events be handled, and component data be propagated to
beansinan orderlyfashion.
A JavaServer Faces page is also different from a JSP page in that it is represented by a tree of UI
components,calledaview.Duringthe lifecycle,the
Q.6 Describe the process of deactivating Individual ExpressionLanguage Statementswith example.
Answer:- Deactivating the ExpressionLanguage inan Entire Web Application:-
The JSP 2.0 expression language is automatically in web applications whose deployed descriptor refers
to servletspecificationversion2.3or earlier.
On the other hand, the following web.xml file is compatible with JSP2.0 and thus stipulates that the
expressionlanguage shouldbe activatedbydefault.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601

More Related Content

What's hot

What's hot (20)

Enterprise java unit-3_chapter-1-jsp
Enterprise  java unit-3_chapter-1-jspEnterprise  java unit-3_chapter-1-jsp
Enterprise java unit-3_chapter-1-jsp
 
Jdbc
JdbcJdbc
Jdbc
 
Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2Enterprise java unit-1_chapter-2
Enterprise java unit-1_chapter-2
 
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web AppsSession 31 - Session Management, Best Practices, Design Patterns in Web Apps
Session 31 - Session Management, Best Practices, Design Patterns in Web Apps
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Jsp
JspJsp
Jsp
 
WEB TECHNOLOGIES JSP
WEB TECHNOLOGIES  JSPWEB TECHNOLOGIES  JSP
WEB TECHNOLOGIES JSP
 
Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4Session 28 - Servlets - Part 4
Session 28 - Servlets - Part 4
 
Session 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design PatternsSession 34 - JDBC Best Practices, Introduction to Design Patterns
Session 34 - JDBC Best Practices, Introduction to Design Patterns
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
 
Session 36 - JSP - Part 1
Session 36 - JSP - Part 1Session 36 - JSP - Part 1
Session 36 - JSP - Part 1
 
Session 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, ServletsSession 25 - Introduction to JEE, Servlets
Session 25 - Introduction to JEE, Servlets
 
Session 32 - Session Management using Cookies
Session 32 - Session Management using CookiesSession 32 - Session Management using Cookies
Session 32 - Session Management using Cookies
 
Oip presentation
Oip presentationOip presentation
Oip presentation
 
Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)Session 37 - JSP - Part 2 (final)
Session 37 - JSP - Part 2 (final)
 
Oip presentation
Oip presentationOip presentation
Oip presentation
 
Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6Session 30 - Servlets - Part 6
Session 30 - Servlets - Part 6
 
Java server pages
Java server pagesJava server pages
Java server pages
 
Session 33 - Session Management using other Techniques
Session 33 - Session Management using other TechniquesSession 33 - Session Management using other Techniques
Session 33 - Session Management using other Techniques
 
Jsp
JspJsp
Jsp
 

Similar to Bt0083, server side programming theory

Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
Raghu nath
 
Csajsp Chapter15
Csajsp Chapter15Csajsp Chapter15
Csajsp Chapter15
Adil Jafri
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
ejjavies
 

Similar to Bt0083, server side programming theory (20)

Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Bt0083 server side programming-theory
Bt0083   server side programming-theoryBt0083   server side programming-theory
Bt0083 server side programming-theory
 
Jsp and Servlets
Jsp and ServletsJsp and Servlets
Jsp and Servlets
 
Csajsp Chapter15
Csajsp Chapter15Csajsp Chapter15
Csajsp Chapter15
 
Jsp
JspJsp
Jsp
 
Jsp
JspJsp
Jsp
 
Atul & shubha goswami jsp
Atul & shubha goswami jspAtul & shubha goswami jsp
Atul & shubha goswami jsp
 
Weblogic
WeblogicWeblogic
Weblogic
 
JSP Components and Directives.pdf
JSP Components and Directives.pdfJSP Components and Directives.pdf
JSP Components and Directives.pdf
 
Online grocery store
Online grocery storeOnline grocery store
Online grocery store
 
Arpita industrial trainingppt
Arpita industrial trainingpptArpita industrial trainingppt
Arpita industrial trainingppt
 
JAVA SERVER PAGES
JAVA SERVER PAGESJAVA SERVER PAGES
JAVA SERVER PAGES
 
Mvc15 (1)
Mvc15 (1)Mvc15 (1)
Mvc15 (1)
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...JavaScript, often abbreviated as JS, is a programming language and core techn...
JavaScript, often abbreviated as JS, is a programming language and core techn...
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Unit 4 web technology uptu
Unit 4 web technology uptuUnit 4 web technology uptu
Unit 4 web technology uptu
 
Unit 4 1 web technology uptu
Unit 4 1 web technology uptuUnit 4 1 web technology uptu
Unit 4 1 web technology uptu
 
Application server vs Web Server
Application server vs Web ServerApplication server vs Web Server
Application server vs Web Server
 
10 jsp-scripting-elements
10 jsp-scripting-elements10 jsp-scripting-elements
10 jsp-scripting-elements
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Bt0083, server side programming theory

  • 1. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : “ help.mbaassignments@gmail.com ” or Call us at : 08263069601 ASSIGNMENT PROGRAM BSc IT SEMESTER FOURTH SUBJECT CODE & NAME BT0083,Server Side Programming-Theory CREDIT 4 BK ID B1088 MAX.MARKS 60 Q1.Define and explainwebservers and applicationservers. Answer: A Web server exclusively handles HTTP requests, whereas an application server serves business logicto applicationprograms throughanynumberof protocols. Let's examine eachinmore detail. The Webserver A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programsgenerate aresponse,mostofteninHTML,for viewinginaWebbrowser. Q2 ExplainServletmethodsused to retrieve data from HTML form. Give an examples. Answer:HandlingformdatarepresentedinHTML page is a verycommontask inwebdevelopment.A typical scenarioisthe userfillsinfieldsof aformand submitsit.The serverwill processthe request
  • 2. basedon the submitteddata,andsendresponse backtothe client.The followingpicture depictsthat workflowwithJavaservletonthe serverside: Q.3 Describe the followingexceptionhandlingmethodsina servlet withthe helpof examples 1. Usingthe web.xml file 2 Usinga RequestDispatcher 1. Usingthe web.xml file Answer: When a servlet throws an exception, the web container searches the configurations in web.xml that use the exception-typeelementforamatch withthe thrownexceptiontype. We would have to use the error-page element in web.xml to specify the invocation of servlets in response to certain exceptions or HTTP status codes. Consider, you have an ErrorHandler servlet which would be called whenever there is any defined exception or error. Following would be the entry created inweb.xml. Q2 Usinga RequestDispatcher Answer: The Request Dispatcher interface provides the facility of dispatching the request to another resource it may be html, servlet or jsp. This interface can also be used to include the content of another resource also.Itis one of the wayof servletcollaboration. There are two methodsdefinedinthe Request Dispatcherinterface. Forward method: Q.4 Explainthe two JSP architectures. Answer: - The JSP specification presents two approaches for building web applications using JSP pages: JSP Model 1 and Model 2 architectures. These two models differ in the location where the processing takes place. In Model 1 architecture, the JSP page is responsible for processing requests and sending back repliestoclients. The Model 2 architecture, integrates the use of both servlets and JSP pages. In this mode, JSP pages are used for the presentation layer, and servlets for processing tasks. The servlet acts as a controller
  • 3. responsible for processing requests and creating any beans needed by the JSP page. The controller is also responsible for deciding to which JSP page to forward the request. The JSP page retrieves objects createdby the servletandextractsdynamiccontentforinsertionwithinatemplate. Thismodel promotesthe use of the Model View Q5. Draw and explainthe diagram of custom tag life cycle. Answer: The life cycle of a JavaServer Faces page is somewhat similar to that of a JSP page: The client makes an HTTP request for the page, and the server responds with the page translated to HTML. However, the JavaServer Faces life cycle differs from the JSP life cycle in that it is split up into multiple phases in order to support the sophisticated UI component model. This model requires that component data be converted and validated, component events be handled, and component data be propagated to beansinan orderlyfashion. A JavaServer Faces page is also different from a JSP page in that it is represented by a tree of UI components,calledaview.Duringthe lifecycle,the Q.6 Describe the process of deactivating Individual ExpressionLanguage Statementswith example. Answer:- Deactivating the ExpressionLanguage inan Entire Web Application:- The JSP 2.0 expression language is automatically in web applications whose deployed descriptor refers to servletspecificationversion2.3or earlier. On the other hand, the following web.xml file is compatible with JSP2.0 and thus stipulates that the expressionlanguage shouldbe activatedbydefault. Dear students get fully solved assignments Send your semester & Specialization name to our mail id :