If I define a method in JSP scriplet <%..%>, where will it
go after translation into a servlet?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / vamsi krishna.i
The code that writes in JSP Scriptlets itself excutes in
service method.We can not create a method with in the
Method.So We cont define a method in <%...%>.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / karthikeyan
the question is the scriptlet code. this scriptlets are
embedded into servlet's service method
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / karthik
After translation of jsp code into servlet the scriplets
(<%...%> contents will be executed via the service methods.
suppose if we define the new method inside the scriplte tag
the container will raise the compilation error.
Is This Answer Correct ? | 1 Yes | 0 No |
Can I run seam with jdk 1.4 and earlier?
What is permgen or permanent generation?
What exceptions are thrown by RMI?
Why does most servlets extend HttpServlet?
What is the purpose of the wait() method?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
What’s jboss cache in short?
What is meant by method chaining?
Is there a guarantee of uniqueness for entity beans?
What is local interface. How values will be passed?
suppose i open my yahoo mail.then copy the url. then sign out & close browser.then open browser paste that url on the browser.will i get my mail opened or not? i know it ill not.but how it work.how i create like this type of secure site?
What are the disadvantages of using threads?