Home  |   STIU  |   WOW  |   SCJP  |   SCDJWS   |   JEE FAQ  |   About US  |  

FAQ
  Java FAQ
  JSP FAQ
  Servlet FAQ
 

Advertisement

XyzWs JSP FAQ:
What is the difference between variable declared inside a declaration part and variable declared in scriplet part?


Printer-friendly version Printer-friendly version | Send this 
article to a friend Mail this to a friend


Previous Next vertical dots separating previous/next from contents/index/pdf Contents
Advertisement
XyzWs JSP FAQ: What is the difference between variable declared inside a declaration part and variable declared in scriplet part?

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.


Previous Next vertical dots separating previous/next from contents/index/pdf Contents

Support  | Feedback  | Help