Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
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 :