Explain scriptlet, expression and declaration in jsp.
Answer / Devender Kumar
1. Scriptlet: It is a JSP construct that allows developers to write Java code within a JSP page using the <% %> delimiters. It is generally considered bad practice due to issues with maintainability and separation of concerns.
2. Expression: Expression is used to evaluate a simple Java expression within the JSP page using the <%= %> or ${} delimiters, which prints its value when the JSP page is executed.
3. Declaration: Similar to scriptlet but is used for declaring variables and initializing them, using the <%! %> delimiter.nThe use of scriptlets and declarations should be minimized to maintain a clean separation between Java code and presentation logic.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of pagecontext in jsp?
Which categories can be divided jstl tags, give examples.
which situation you use static include and dynamic include in jsp?
What is jsp servlet?
What is jsp and its uses?
What are the advantages of jstl?
Which two interfaces does the javax servlet jsp package have?
Can we use javascript in jsp?
Explain scriptlet, expression and declaration in jsp.
i am using rich faces datatable rich:datatable. On entering the value, values get filtered in table. Now how can i get the value in back9ing bean..?
What is the page directive is used to prevent a jsp page from automatically creating a session?
What is include directive in jsp?