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 language is jsp?

519


How do you connect to the database from jsp?

543


How are jsp(java server pages) better than asp(active server pages)?

473


How to access java variable in jsp?

496


What are the features of jsp?

495






What are the attributes of page directive?

514


How can you make the finally clause not to fail to execute?

481


What are the attributes on page directives?

506


What is jstl core tags?

486


Why does _jspService() start with an ‘_’ but other lifecycle methods do not?

537


What are the jsp tags?

517


Can a constructor be used in place of init() method to initialize a servlet?

500


Mention the advantages of jsp over pure servlets?

501


What is the requirement of a tag library?

530


What do you mean by custom tag in jsp?

511