If I define a method in JSP scriplet <%..%>, where will it
go after translation into a servlet?

Answer Posted / prs01

It will give compilation error. In order to define a method
in JSP, it should be defined in the JSP declarations <%!..%
>, and it can be called in the JSP expression.
On translation, the method will be added outside all
methods in the servlet class.

Is This Answer Correct ?    35 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different methods of identifying an object?

581


What is the argument type of a programs main() method?

563


Difference between swing and awt?

603


Can constructors be synchronized in java?

621


What is ripple effect?

637






wahts is mean by dynavalidatorform in struts/

1571


Define the remote object implementation?

2001


What are the purpose of introspection?

680


Which class is the immediate superclass of the menucomponent class?

631


Why do I get a duplicate name error when loading a jar file?

546


how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

1755


What are the different algorithms used for clustering?

551


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

574


Explain the difference between object state and behavior?

568


Explain about local interfaces.

591