GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  JSP
Go To First  |  Previous Question  |  Next Question 
 JSP  |  Question 296 of 306    Print  
Where do you declare methods in JSP?

  
Total Answers and Comments: 3 Last Update: June 11, 2008     Asked by: naggeek 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: bharaniprasanth
 
Declarations go outside the service method of converted servlet so ...just delcaring variables...declare it like

<%! public void add(int a , int b)
{
    //body
}
%>


Above answer was rated as good by the following members:
bhupendra3420
July 18, 2007 01:17:29   #1  
B@B@        

RE: Where do you declare methods in JSP?
In JSP You can declare methods in the DECLARATION tag and call that method in EXPRESSION tag.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 10, 2008 04:14:32   #2  
bharaniprasanth Member Since: February 2008   Contribution: 46    

RE: Where do you declare methods in JSP?
Declarations go outside the service method of converted servlet so ...just delcaring variables...declare it like

<%! public void add(int a , int b)
{
    //body
}
%>

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 11, 2008 04:20:51   #3  
pradeepkmr18 Member Since: June 2008   Contribution: 25    

RE: Where do you declare methods in JSP?
In jsp declarations we can declare methods and variables

<%!      int x;
             public void tone()
             {

              }
%>

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape