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

Why do we need servlets and jsp?

468


What are the different scope values for the jsp objects?

493


How can we avoid direct access of jsp pages from client browser?

612


What is called jsp directive?

509


What are jsp and servlets?

473






How to include a jsp file in another jsp file?

484


Can a jsp page instantiate a serialized bean?

560


What is out println in jsp?

515


What is scriptlet in jsp?

498


Can we define a class in a jsp page?

491


What are jsp implicit objects?

500


What language is jsp?

517


How is jsp used in the mvc model?

579


What are the events in jsp page?

475


What is a page directive?

499