and move the other 3 pages of code into declarations for doStuff() and doOtherStuff()
Welcome to the Ranch!
A variable that is created within a JSP scriptlet... in the compiled servlet, is this variable local to the service() method?
One thing I would suggest doing before too much longer is to find out where your servlet container is writing the Java files that it creates from your JSPs, and taking a gander at them to see how a servlet is created from a JSP. Very informative, and will help you be a better JSP writer.
if I declare a separate method within a declaration tag in the same JSP, can it access the same variables (variables declared/used within a plain ol' scriptlet) without having to have them passed in as arguments?
No. The method will be declared as a method of the servlet but will have no access to the local variables defined in service(); just as with any other method.
If not, would it make them global if I declare the variable(s) within a declaration tag rather than a scriptlet
Yes, but you don't want to do that. Each servlet (whether generated from a JSP or not) has a single instance created for it, and creating instance variables for the JSP will introduce a major mess of multi-threading issues. I'd suggest just bucking up and passing info along as params.
Another alternative is to stick them as attributes on the request, but passing them as params will be a lot more straight-forward.
[ May 19, 2003: Message edited by: Bear Bibeault ]