Can we use methods in JSP? If so where the methods are
stored in servlet class file?

Answers were Sorted based on User's Feedback



Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / anto

<%!

action-specifier return type methodname(arguemnts)
{
statements.............or task
}
%>

Is This Answer Correct ?    31 Yes 3 No

Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / mandrita sinha choudhuri

Yes we can write java methods inside jsp files within
the "declarations" tag <!%//the method%>.

This part of the code is compiled by the servlet engine and
inserted outside the _jspservice() method in the generated
servlet class.

Is This Answer Correct ?    38 Yes 11 No

Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / manesh

Mandrita , There is a typo in ur answer.

Its should be <%! //the method%>. not

Regards,
Manesh A. K.

>Yes we can write java methods inside jsp files within
the "declarations" tag <!%//the method%>.
>
>This part of the code is compiled by the servlet engine
and
>inserted outside the _jspservice() method in the generated
servlet class

Is This Answer Correct ?    11 Yes 2 No

Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / madhu

YES We can Write the our own methods or java methods inside
the "JSP Declarations"
Syntax:<%! .................%>

Is This Answer Correct ?    3 Yes 1 No

Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / jayachandra

Description:

We can Develop the methods in jsp pages by using declaation
statements

Sysntex:

<%! //Methods %>

Is This Answer Correct ?    2 Yes 1 No

Can we use methods in JSP? If so where the methods are stored in servlet class file?..

Answer / jhon smith

yes , method are store into class scope.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More JSP Interview Questions

What is c tag in jsp?

0 Answers  


Can we use methods in JSP? If so where the methods are stored in servlet class file?

6 Answers   Bodhtree, Cognizant, Persistent, TCS,


What is translation phase?

0 Answers  


What is jstl jar?

0 Answers  


why ,what, when, where,how the extended star schema is used.

0 Answers  






What is tag file in jsp?

0 Answers  


What is a scriptlet?

0 Answers  


What are the two kinds of comments in jsp and what's the difference between them ?

0 Answers  


How many messaging models do jms provide for and what are they?

0 Answers  


Which tag is used for error handling in jsp pages?

0 Answers  


What is jsp action tags?

0 Answers  


What is a hidden comment in jsp?

0 Answers  


Categories