This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
This question is so vague as to be meaningless. And what does it have to so with custom tags? But, using one possible interpretation of the question, yes you can create and reference local variables in Java scriptlets within a JSP. Any such scriplets become part the service method of the JSP-generated servlet. bear
More carefully-worded questions will get better answers. To this one: no. While you can pass the values of scripting variables to custom tags through the attributes that allow run-time values, you cannot access scripting variables by name in custom tags. Tacking values onto the page context as attributes is a common means of passing non-attribute info to tags. (Though I'd be cautious about doing so since you can create artificial bindings between your pages and tags that could limit the reusability of the tags). bear