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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is jsp container?

496


What is the scope of response object?

639


How can a thread safe JSP page be implemented?

573


How do we prevent browser from caching output of my jsp pages?

503


What is the purpose of jsp?

543






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

510


Can we override the jspinit(), _jspservice() and jspdestroy() methods?

522


How can we retrieve warnings?

523


How to call java method in jsp page on button click?

1007


How to delete a cookie in jsp?

552


What is difference between include directive and jsp:include action?

497


Explain the difference between servletcontext and pagecontext in jsp?

493


What is the page directive is used to prevent a jsp page from automatically creating a session?

560


What are the different types of jsp tags?

491


What is jsp and its advantages?

516