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 can multiple submits due to refresh button clicks be prevented?

576


How will you use jsp el in order to get the http method name?

503


What is session object in jsp?

583


What are the attributes of page directive?

514


Why session is used?

465






Is jsp and javascript same?

493


What are jsp declarations?

535


What's the difference between javabeans and taglib directives?

534


What are the different types of jsp directive?

512


What is the use of jstl?

480


What is the default value of session attribute in jsp?

458


write a program in javasacript to shake the window

2479


What is expression language injection?

498


What are advantages of jsp over asp, php, pure servlets and others?

479


What are the advantages of jstl?

479