BT0083 - Server Side Programming-Theory

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 )


SPRING 2016 – ASSIGNMENT

PROGRAM
BSC IT
SEMESTER
4
SUBJECT CODE & NAME
BT0083 - Server Side Programming-Theory
CREDITS
4 Credits
BK ID
B1088
MARKS
60


Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each question is followed by evaluation scheme.



Question.1. Describe java servlets and compare it with CGI.

Answer:The Common Gateway Interface (CGI) is the first technology used to generate dynamic contents. It allows a web client to pass data to the application running on the web server so that a dynamic web page can be returned to the client according to the input data. For example, when you use a search engine, buy a book at an online store; get a stock quote etc., your browser uses CGI to communicate with a server side application.

Advantages of CGI

1. CGI is a true cross-platform technology. This means that CGI scripts work with any web browser as well as with most web servers running on Windows and Unix.

2. CGI is

Question.2. Explain how to handle the form elements to retrieve data from form, using servlet API. Give some examples.

Answer: Handling form data represented in HTML page is a very common task in web development. A typical scenario is the user fills in fields of a form and submits it. The server will process the request based on the submitted data, and send response back to the client. The following picture depicts that workflow with Java servlet on the server side:
 
To create a form in HTML we need to use the following tags:

<form>: to create

Question.3. Write a note on tracking the sessions using cookies. Give advantages and disadvantages of cookies.

Answer:Session Tracking is a way to maintain state (data) of an user. It is also known as session management in servlet.

Http protocol is a stateless so we need to maintain state using session tracking techniques. Each time user requests to the server, server treats the request as the new request. So we need to maintain the state of an user to recognize to particular user.

HTTP is stateless
Why use Session Tracking?

To recognize the user It is used to recognize the particular user.

Session Tracking Techniques: There are four techniques used in Session tracking:




Question.4. Explain the two JSP architectures.

Answer: The early JSP specifications presented two approaches for building web applications using JSP technology. These two approaches were the JSP Model 1 and Model 2 architectures. Although these terms are no longer used in the JSP specification, they still are widely used throughout the web tier development community.

The two JSP architectures differ in several key areas. The major difference is in how and by which component the processing of a request is handled. With the Model 1 architecture, the JSP page handles all of the processing of the request and is responsible for displaying the output to the client. This is illustrated in Figure 1-3.

Figure 1-3. JSP Model 1 architecture

Notice that there is no





Question.5. Draw and explain the diagram of custom tag life cycle.

Answer:Introducing attributes into a custom tag does change the tag life cycle slightly because before the functionality of the tag can be executed (the doTag() method in the case of simple tags), the attributes must be passed to the tag handler so that they can be used by the tag. The way that the JSP specification allows this is through properties and setter methods of the tag handler class. A tag handler must have a property and a setter method for every attribute that it supports.

Note The necessity for the tag handler to have a property and setter method for every supported attribute is

The life cycle of a simple tag with parameters

As this diagram shows, the setter methods for

Question.6. Describe the process of deactivating individual expression language statements with an example.

Answer:JSP is one of the most powerful, easy-to-use, and fundamental tools in a Web-site developer's toolbox. JSP combines HTML and XML with Java TM servlet (server application extension) and JavaBeans technologies to create a highly productive environment for developing and deploying reliable, interactive, high-performance platform-independent Web sites.

When used directly within pages, you could get code like this:

<body bgcolor="${EL Expression}">

Listing 3.7 shows a basic JSP that is using the expression language directly in the page.
Listing 3.7 usingEL.jsp

<!--


    The expressions are evaluated from left to right. Each expression is coerced to a String and then concatenated with any intervening text. The resulting String is then coerced to the attribute's expected type.

    With text only:

<some:tag value="sometext"/>

   
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 )


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.