We created some JSP fragments and want to reuse them. But the problem is in JSP, the attributes are used everywhere in the page. There is no facility similiar to variable/method argument declaration in Java/C/C++. As a result, given a piece of JSP, we have to scan thru the whole file to dig out all the expected input values (attributes). Is there any simple way to overcome this issue? One approach I can think of is to refactor the JSPs to include scriplet at the beginning to check the existence of expected attributes in the required scope.