Showing posts with label jsp interview. Show all posts
Showing posts with label jsp interview. Show all posts

Jsp Interview Faqs

Jsp Interview Faqs
Q:  What is a Expression?
A: An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. Like
<%= someexpression %>
<%= (new java.util.Date()).toLocaleString() %>
You cannot use a semicolon to end an expression

Q: What is a Declaration?
A: A declaration declares one or more variables or methods for use later in the JSP source file.
A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as they are separated by semicolons. The declaration must be valid in the scripting language used in the JSP file.
<%! somedeclarations %>
<%! int i = 0; %>
<%! int a, b, c; %>

Q:  What is a Scriptlet?
A: A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language.Within scriptlet tags, you can
1.Declare variables or methods to use later in the file (see also Declaration).
2.Write expressions valid in the page scripting language (see also Expression).
3.Use any of the JSP implicit objects or any object declared with a tag.
You must write plain text, HTML-encoded text, or other JSP tags outside the scriptlet.

Scriptlets are executed at request time, when the JSP engine processes the client request. If the scriptlet produces output, the output is stored in the out object, from which you can display it.

VB script Java script interview questions and answers

VB script Java script interview questions and answers
Name the 2 kinds of procedures in VBScript?
Sub procedure
Function procedure
VBScript variable names cannot exceed
255 characters
Which Keyword is used in VBScript to increase or decrease the counter variable by the value?

STEP KeyWord
What will be the Output of the following using JavaScript document.Write(Math.Round(6.7));
Output:7
Which method is used to convert a string in to uppercase Letters using javascript?
toUpperCase()
Name the DatTypes of JavaScript?
1)Integer
2)String
3)Boolean
4)Null

JSP Interview Questions and answers

JAVA SCRIPT Interview Questions and answers
Can Javascript code be broken in different lines?
Yes,
Breaking is possible within a string statement by using a backslash "\" at the end .
Ex:
document.write("Good Morning. \
I am Mr. John");
But it is not possible within any other javascript statement.
Ex :
is possible but not
document.write \
("Good Morning. I am Mr. John");
What does break and continue statements do in JavaScript?
Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop in JavaScript.
Explain about the Boolean functions present in Javascript?
Three Boolean operators are present in Javascript they are
1) &&
2) II
3) /
All the operators are regarded as true unless the Javascript regards them as false. You can define these operators to make as statement false number0, null, undefined, or a string of length 0, etc. Boolean function performs these conversions explicitly.
What is the difference between an alert box and a confirmation box?
An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.
How to validate a Email-address, in Form using JavaScript?
We can validate it through the reg expressions. For example we can declare all the reg expressions of the email in a variable as follows.
var reg = /^([A-Za-z0-9_-.])+@([A-Za-z0-9_-.])+.([A-Za-z]{2,4})$/; We need to compare the actual value with this expression for the validation.
How do you declare 2 dimensional array in Javascript?
myarray[0][0]="Compaq 486"
myarray[0][1]="Compaq 586"
myarray[0][2]="Compaq 686"
myarray[1][0]="Dell 486"
myarray[1][1]="Dell 586"
myarray[1][2]="Dell 686"
myarray[2][0]="IBM 486"
myarray[2][1]="IBM 586"
myarray[2][2]="IBM 686"
How do you Implement Timer Control in Javascript?
set Timedout("alert('5 seconds')",5000); Here the argument 5000 shows the millisecond value.
Whether VBscript or Javascript which is better?
Javascript. Since it is platform independent.
Whether Javascript is a OOP's based language?
No. It doesn't support all the concepts of OOPS. It supports partially.