ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what are the jsp tags with example?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what are the jsp tags with example?
Answer
# 1
(1)A declaration tag places a variable definition inside 
the body of the java servlet class. Static data members may 
be defined as well. Also inner classes should be defined 
here. 
Example:<%! int serverInstanceVariable = 1; %>

Declaration tags also allow methods to be defined.

<%!
  /** 
   * Converts the Object into a string or if
   * the Object is null, it returns the empty string.
   */
  public String toStringOrBlank( Object obj ){
    if(obj != null){
      return obj.toString();
    }
    return "";
  }
%>

(2)A scriptlet tag places the contained statements inside 
the _jspService() method of the java servlet class. 

<% int localStackBasedVariable = 1;
out.println(localStackBasedVariable); %>

(3)An expression tag places an expression to be evaluated 
inside the java servlet class. Expressions should not be 
terminated with a semi-colon . 

<%= "expanded inline data " + 1 %>

(4)Also we can use the following tag to give comments in 
jsp: 

<%-- give your comments here --%>
 
Is This Answer Correct ?    1 Yes 0 No
Sivasubramanian.k
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
I/O blocking means?  1
Q) I have a ArrayList object, in that object i have added 5 integer values, 5 float values, 5 string values. Now question is how can delete particular type of data ( i.e all int values or all float values or string values) in that list object at a time? Aricent2
Name the method that is used to set a TextComponent to the read-only state?  1
What is the difference between this() and super()? TCS11
if arraylist size is increased from initial size what is the size of arraylist...suppose initial is 100 , if i add 101 element what is the size...  6
What is the difference between array and arraylist? what is the difference between arraylist and linkedlist? EDS4
Is 'sizeof' a keyword?  5
What is UNICODE?  3
why the equals method can be override?when we override the equals method?  4
Explain about Superclass and Subclass?  4
If two threads call a static method at the same point of time, what will happen? KPIT1
which methods consisting of the serilizable interface?  3
Can we add two byte variables and assign the result to a byte variable ? b=b1+b2 where b,b1,b2 are byte types TCS3
What is hypertext?  1
Real Time sample code for Encapsulation and Abstraction. where to use abstract and where to use specifies like public private.  1
How the elements are organized in CardLayout?  5
Can you declare a static variable in a method?  4
What is update method and when it is called?  1
Explain Global variables in Packages?  2
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?  2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com