Question
Define JSP Declaration.

Answers

JSP Declaration are tags used in declaring variables. They are enclosed in <%!%> tag. They are used in declaring functions and variables.
 
XHTML
<%@page contentType=”text/html” %>


<%!
int a=0;
private int getCount(){
a++;
return a;
}
%>

Values of a are:


<%=getCount()%>



123456789101112131415161718192021222324252627
<%@page contentType=”text/html” %>   <%! int a=0; private int getCount(){ a++; return a; } %> 

Values of a are:

 

<%=getCount()%>

  

    Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Will first logic's global data quality connector for sap manage my international data?
  • Q In the Mughal administration Madad-i-Mash indicates-
  • Q Tell me about the best supervisor you’ve ever had.
  • Q Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
  • Q Can i have a reference as a data member of a class? if yes, then how do i initialise it?
  • Q What are the models used to make money in gaming business?
  • Q The total salary of workers of tol enterprise in 2007 is n17.4 x 106 while it is n13.2 x 106 in 2004. Calculate the percentage average index in 2007 using 2004 as base year?
  • Q Give few examples of final classes defined in Java API?
  • Q If a class derives from another class, will the derived class automatically contain all the public, protected, and internal members of the base class?
  • Q Mention what are the three types of object relations in salesforce?
  • Q How many types of relations are there between dimension and measure group?