What is the difference between variable declared inside a declaration part and variable declared in scriplet part?
Variable declared inside declaration part is treated as a global variable.that means after convertion jsp file into servlet
- that variable will be in outside of service method as an instance variable
- the scope is available to complete jsp and to complete in the converted servlet class.
Variable declared inside a scriplet that variable will be declared inside a service method and the scope is with in the service method.
Most Recent jsp Faqs
- How to get the real requested URI from inside the error page?
- Can I define a method in a JSP page?
- What is the difference between request.getParameter() and request.getAttribute()?
- What is difference between page and pageContext in JSP pages?
- How to config a JSP file in web.xml?
- What is the difference between jsp:forward and response.sendRedirect?
- How to retrieve values from HTML form input elements in JSP?
Most Viewed jsp Faqs
- How to config a JSP file in web.xml?
- What is difference between page and pageContext in JSP pages?
- How to disable browser caching for a specific JSP?
- How to retrieve values from HTML form input elements in JSP?
- What is the difference between jsp:forward and response.sendRedirect?
- What is the difference between request.getParameter() and request.getAttribute()?
- How to get the current JSP page name?