I must preface this by stating that at this point in time,
you should be using
JSP 2.0 and shouldn't be using either of the declarations or scriptlets in your pages any longer.
That said, scriptlets are code fragments that are collected to form the service method of the JSP along with the statements needed to emit the template text.
Declarations are placed at class-level rather than within a method.
Declarations are the easiest way to introduce threading bugs into yout JSP pages and should be avoided unless absolutely necessary even in older JSP versions.
[ August 16, 2007: Message edited by: Bear Bibeault ]