how will declare a variable in page directive? you cannot.
I guess you are talking about include directive.
Even you include another JSP file using include directive, it will copied into main JSP file at transalation time(JSP -> Servlet) not at compile time. So whatever variable you declared in included JSP still be avalible at runtime in main JSP.
Also, with all due respect... Wouldn't it have been faster to write a little JSP test page to find this out than to write to a forum and wait for someone else to answer?
And the other thing is that, Can the declared variable in a directive be chaged dynamically or at runtime? Supposed int a =4; is declared in diretives what will happen if I use for loop to print int a according to my wish?
[ December 08, 2006: Message edited by: Ben Souther ]