VUDESK

¤Virtual University Of Pakistan Network¤



Welcome Visitors to VUDESK Family .Join VUDESK For Free to Get more Access to study material and lot of infotainment stuff. Stay Connected!!

VUDESk ALL Subject CODES
Find Your Subject Code , Join Group And You Will Get ALL related Data
ACC - Fundamentals of auditing and business
ACC311ACC501
ACF - (Accounting And Finance Related)
ACF619ACFI619
COM - (Commerce Related)
COM619COMI619
ECO - (Economics Related)
ECO401 ECO402 ECO403 ECO404
ENG - (English Related)
ENG001 ENG101 ENG201 ENG301 ENG401
ETH201 - Ethics (for Non-Muslims)
ETH201
ISL201 - Islamic Studies
ISL201
IT - (Info Tech Related
IT000IT0001IT430IT619ITI619
MIS - (Project And Internship Report)
MIS619 MISI619MIS620 MISI620
PAD - (Public Administration Related)
PAD619 PADI619
PAK301 - Pakistan Studies
PAK301PAK302
PHY - (Physics Related)
PHY101 PHY301
PSC201 - International Relations
PSC201PSC401
SOC - (Socialogy Related)
SOC101 SOC401
STA - (Statistics and Research)
STA301 STA630
URDU - (Urdu Related)
URD101

 CS506 Web Design and Development-final term spring 2012-dated 16 to 27 july

share

Tags: 16, 2012-dated, 27, CS506, Design, Development-final, Web, and, july, spring, More…term, to

Views: 58

Replies to This Discussion

Advertise Here

What is Package? How Packages are organized? (3 Marks)

How can we read cookies from client? (2 Marks)

Write the code for a javabean class, "MyBean" with an attribute "name" of String datatype. (5 Marks)

What technology is used in Java, that supports the following; (5 Marks)

Presentation Layer

Business Layer

Data Layer

How can we use FileReader and FileWriter streams to print on console? (2 Marks)

Write the name of three types of Custom Tags? (3 Marks)

Differentiate between encodeURL() and encodeRedirectURL()? (2 Marks

What are advantages of jsp over PHP? 2
Why use client side validation? 2
Character oriented vs. byte oriented stream? 2
Does JSP support run time exception handling if yes then how? 2
Advantages of JSP over servlet? 3
Difference between variable declared inside declaration part and scriplet part? 3
Why not use ==operator to compare string object of equal value? 3
Why need expression languages? 3
What does it means method or class abstract? 5
Why need JSP as we have servlet? 5
What impact have java bean object can produce when it store in session objects? 5
Difference between page centric and page with beans approach? 5

Why we use session tracking 2 marks
-What are page error and how it handdle in JSP 2marks
-web service according to W3C 2 marks
-For what purpose c:remove tag is used. (2marks)
- What are advantages of jsp over Servlets 3 marks
-EJBs and JSP/servlet run on which server? 3marks
-What is impact a java bean object can produce when it is stored in an application 3 marks
-Diff b/w serialized and deserializaed 3marks
- Why need JSP as we have servlet? 5 marks
- What are validator? and there types 5 marks
- How streams handdle in Java 5marks

40 MCQs mostly from past papers.

12 Questions

 

Qno.1  What is JavaBean?

Qno.2  How JSF does provide Navigation?

Qno.3  What is Expression in JSP? Give an example

Qno.4  Suppose you are Web Developer in SoftImpack company, you need to advise how can suggest JSP directive ?

Qno.5 What do you know about forward and how does work request dispatchers include method?

Qno.6  Disadvantages of URL Rewriting?

Qno.7 What are the Data Definition Language DDL, statement of SQL.?

Qno.8  diff b/w encodeURL and encodeRedierstURl    

Qno.9  Differentiate between Web Services and We Pages?

Qno.10 What is validator? write types of built in validator

Qno.11 Statement

Qno.12 Statement

 

  1. write down the code for making a graphical interface 
  2. what are two ways to read initialization parameters of a servlet ?
  3. which litrals are supported by expression language
  4. if java does not use layout managers then wht difficulties would he face when creating graphical user inter face?
  5. wht are the expression language
  6. wht r the advantage of using custom tags ?
  7. how objects become elegible for garbage colllection ?

current solved

Download Documents

5 marks
what is custom tag? why do we need it?
what are the advantage of cookies over url re writing..?
what is a difference b/w value binding and method binding..
Steps to write an applet in java?

3 marks
disadvatages of URL rewriting..
6 feature of jsp?
why compiler show checked exception but not an unchecked exception?

What is impact a java bean object can produce when it is stored in an application?

java code program  to find exception error
how to servlet extend to functionality of web server
how to define and use error page in JSP
different b/w layers and tiers
when does compiler supply default constructor for our code
what is jsp scirplet & explain it
what type of information can be appended to URL?
why do we need expression language
can we overload the main() method
why the session tracing is necessary
why are java bean design conversion
different b/w web page and wed services.?

Q1: Write 6 features of JSF? 5

Q2:What is Package? How Packages are organized? 5

Many times when we get a chance to work on a small project, one thing we intend to do os to put all java files into a single directory(folder). It is quick, easy and hamless. Hwever, if our small project gets bigger the number of files is increasing, putting all these files into the same directory would bea nightmare for us. In java we can avoid this sort of problem by using packages.

In simple terms, a set of java classes organized for convenience in the same directory to avoid the name collisions. Packages are nothing more than the way we organize files into different directories according to their functionality, usability as well as category they should belong to.

Q 3:Write the name of types of Custom Tags? (5 Marks)

1- simple tgs

2- custom tags

3- tags with attributes

4- tags with bodies

(explanation from handouts)

Q 4:What do yoy know about expression languages? 3

The EL is not a programming or scripting language, provides a better way to simplify expressions in JSP. It is a simple language that is geared up towards looking up objects, its properties and performing simple operations on it. It is inspired by both the ECMA Script XPath expression language.

Q5: describe servlet context (2)

Servlet contex belongs to one web application. Therefore it ca be used for sharing resources among servlets in the same web application.

Q6:Advantages of Cookies over re-writing URLs? 5

Q 7: What are two ways of request dispatching? Explain

Q 8: Database connectivity steps? 5

There are following steps required to create a new Database using JDBC application:

Import the packages . Requires that you include the packages containing the JDBC classes needed for database programming. Most often, using import java.sql.* will suffice.
Register the JDBC driver . Requires that you initialize a driver so you can open a communications channel with the database.
Open a connection . Requires using the DriverManager.getConnection() method to create a Connection object, which represents a physical connection with datbase server.

To create a new database, you need not to give any database name while preparing database URL as mentioned in the below example.

Execute a query . Requires using an object of type Statement for building and submitting an SQL statement to the database.
Clean up the environment . Requires explicitly closing all database resources versus relying on the JVM's garbage collection.

Q 9: What are methods of java bean design conventions? (5)

Q10: explain ResultSet? 3

Q 11: What is Expression in JSP? Give an example. (5 Mark) Answer:- (Page 335)

The format of writing a Java expression is: <%= Java expression %> These expressions are evaluated, after converted to strings placed into HTML page at the place it occurred in JSP page Examples of writing Expressions are:

Time: <%= new java.util.Date() %>

will print current data & time after converting it to String

Welcome: <%= request.getParameter(―name‖)%>

will print the name attribute

Q 12: Write briefly two characteristics of Expression Language?

The Expression Language, not a programming or scripting language, provides a way to simplify expressions in JSP. It is a simple language that is geared towards looking up objects, their properties and performing simple operations on them. It is inspired form both the ECMAScript and the XPath expression language.

Q 13: why do we need tiers if we have layers? 5

Layers are simply logical grouping of the software components that make up the application or service, wheras Tiers refer to the physical residence of those layers. In simple words layers represents the logical view of application while Tiers represents physical view of application.

Q 14: Why is direct call of paint() method not recommended?

Q 15:What is the difference between variable declared inside a declaration part and variable in scriplet part?

Question #1

What are the three stages of Servlet Lifecycle? (3 Mark) Answer:- (Page 267) A servlet passes through the following stages in its life.

1 Initialize

2 Service

3 Destroy

Question #2

Why is direct call of paint() method not recommended?

Answer:- (Page 191 ) Painting is managed by system, so calling paintComponent() directly is not recommended at all. Similarly calling paint ( ) method is also not recommended. Why? Because such code may be invoked at times when it is not appropriate to paint -- for instance, before the component is visible or has access to a valid Graphics object.

Question #3

Which Five operators are used in Expression Language

Type

operator

Arithmetic

+ _ * \ (div) % (mod)

Grouping

( )

Logical

&&(and) ││(or) !( not)

relational

==(eq) !=(ne) <(lt) >(gt) <= (le) >= (ge)

Empty

The empty operation is a prefix operation used to determine if a value is null or empty. It returns a Boolean value

Conditional

?:

Question #4

What is Expression in JSP? Give an example. (5 Mark) Answer:-

(Page 335) The format of writing a Java expression is: <%= Java expression %> These expressions are evaluated, after converted to strings placed into HTML page at the place it occurred in JSP page Examples of writing Expressions are:

Time: <%= new java.util.Date() %>

will print current data & time after converting it to String

Welcome: <%= request.getParameter(―name‖)%>

will print the name attribute

Question #5

Why do we need Expression language? Answer:- (Page 451)

The Expression Language, not a programming or scripting language, provides a way to simplify expressions in JSP. It is a simple language that is geared towards looking up objects, their properties and performing simple operations on them. It is inspired form both the ECMAScript and the XPath expression language.

Question #6

What are action elements of JSP? How these are written. (5 Marks) Answer:

- (Page 367) JSP Action Elements JSP action elements allow us to work with JavaBeans, to include pages at request time and to forward requests to other resources etc.

- Format Expressed using XML syntax

- -Opening tag

- -Body body

- -Closing tag

Empty tags (without body) can also be used like

Some JSP Action Elements

To work with JavaBeans

-

-

-

To include resources at request time

-

To forward request to another JSP or Servlet -

To work with applets

-

-

Question #7

Why Client side Validation Good?(page 480)

Answer There are two good reasons for client side validation

- It’s a faster form of validation: if something’s wrong, the alarm is triggered upon submission of the form

- You can safely display only once error at a time and focus on the wrong field,to help ensure that the the users correctly fill all the detail you need

-

Question #8

How cookies are sent to a client? Answer:- (Page 299)

Sending Cookies to Browser Following are some basic steps to send a cookie to a browser (client)

. 1.Create a Cookie Object A cookie object can be created by calling the Cookie constructor,

which takes two strings: the cookie name and the cookie value.

Cookie c = new Cookie (―name‖, ―value‖);

2. Setting Cookie Attributes

Before adding the cookie to outgoing headers (response), various characteristics of the cookie can be set. For example, whether a cookie persists on the disk or not. If yes then how long. A cookies by default, lasts only for the current user session (i.e. until the user quits the session) and will not be stored on the disk.

Using setMaxAge(int lifetime) method indicates how much time (in seconds) should elapse before the cookie expires.

c.setMaxAge(60); // expired after one hour

3. Place the Cookie into HTTP response After making changes to cookie attributes, the most important and unforgettable step is to add this currently created cookie into response. If you forget this step, no cookie will be sent to the browser

. response.addCookie(c);

Question #9

Why do we use session tracking in HTTP servlets?

Answer:- In HttpServlet we can use Session Tracking to track the user state. Session is required if you are developing shopping cart application or in any e-commerce application.

Question #10

How MVC work with JSP page,servlet,Html

Answer

(page no 410 )

.

Question #11

How can we use a existing Database by using JDBC write the steps?

Question #12

What is abstract classes

Answer on page #96 handout

Question 1:

Define web service according to W3C? (2)

Question 2:

What are the two ways of Request Dispatching? Briefly explain each? (2)

Question 3:

How do we define and use error pages in JSP? (2)

Question 4:

As a programmer, write down the code to load driver for Oracle in JDBC? (2)

Question 5:

Differentiate between serialization and de-serialization? (3)

Question 6:

What are the benefits of using Packages? Explain with an example? (3)

Question 7:

How many servlets are created by the include directive or jsp: include? (3)

Question 8:

What are expression language nuggets? (3)

Question 9:

What are JavaBeans design conventions? (5)

Question 10:

Which literals are supported by Expression language? (5)

Question 11:

What are the steps to write an applet in java? (5)

Question 12:

What is a Package? How are they organized? (5)

otal 52 out of which 40 were mcq's

1 write any two implicit objects (2)

2 describe servlet context (2)

3 why this keyword is used if we not use it then what will be he problems (2)

4 stages of servlet life cycle (3)

5 why session tracking is necessary (5)

6 why the expresion language is used (3)

7 describe twin libraries (5)

8 why there is no global variable in java(5)

9 for what purpose the c:remove is used in JSTL(2)

10 explain the JSP life cycle (5)

RSS

*Member OF Week*

1. SiLeNt MooN(Admin)

SAHIWAL, Pakistan

=======================

Popular Social Events

=======================

+ Member of the Day

+ Member of the Week

+ Member of the Month

+ Member of the Year

+ Miss VU

+ Mr VU

+ Gold Members

+ Vote for Miss VU

+ Vote for Mr VU

+ Members Points Table

+ Profile Points Allocation

+ Competition Corner

+ Our Fans Club

+ Certificate Winners

---------------------------------------

௵ Scholars Of Desk

 Gold Members

 MR VU,S

௵ MISS VU,S

 Members Of Month

 Team Members

 Moderators 

  ADMINS

ʭAdministrationʭ

Senior Admin : Yasmeen

VUDESK Owner : Ismail Shah

DMCA.com

VUDESK GROUPS

© 2013   Created by ʭIsmail Shahʭ.

Badges  |  Report an Issue  |  Terms of Service

-->