Can we use methods in JSP? If so where the methods are
stored in servlet class file?
Answers were Sorted based on User's Feedback
Answer / anto
<%!
action-specifier return type methodname(arguemnts)
{
statements.............or task
}
%>
| Is This Answer Correct ? | 31 Yes | 3 No |
Answer / 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 |
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 |
Answer / madhu
YES We can Write the our own methods or java methods inside
the "JSP Declarations"
Syntax:<%! .................%>
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / jayachandra
Description:
We can Develop the methods in jsp pages by using declaation
statements
Sysntex:
<%! //Methods %>
| Is This Answer Correct ? | 2 Yes | 1 No |
What is pagecontext?
Which one is better jsp or servlet?
how to insert star image and need to rate it.. one star two star so on how to do in jsp...????
How do I save a jsp file?
How do I perform browser redirection from a jsp page?
Explain the difference between jspwriter and servlet printwriter in jsp?
how the jsp file is compiled?
4 Answers College School Exams Tests, Persistent,
What are the events in jsp page?
What is scriptlet and what is expression?
What is difference between javascript and jsp?
Which is mandatory in tag in jsp?
What is a scriptlet in jsp and what is its syntax?