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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How we can include the result of another page in jsp?

497


What are the lifecycle phases of a jsp?

540


What’s the difference between forward and sendredirect?

550


How to send data from one page to another in jsp?

484


What are the jsp lifecycle phases?

546






What is session object in jsp?

569


Which one is better jsp or servlet?

463


What is the use of jstl tags in jsp?

503


What is tld in jsp?

472


What is action tag in jsp?

485


How many jsp implicit objects are there?

476


What are the jsp tags?

507


What is jsp param?

641


Which attribute specifies a jsp page that should process any exceptions thrown but not caught in the current page? : Citibank

507


What are the differences between get and load methods?

501