O
oldJet
Hi Group,
I’ve been recently asked to maintain a legacy application with lots of
scriptlet code.
Here is the snippet that I need help with:
<%!
public void method1 (String x, String y) {
String z = method2();
doComplexStuff(x, y, z);
}
%>
method1 is being called from numerous places in this (very) large JSP
file. I need to replace the doComplexStuff() method with a custom tag
that looks something like this:
<xyz:doComplexStuffTag x="value1" y="value2" z="value3" />
Is there a way to replace the fourth line, i.e the doComplexStuff
(x,y,z) call, with the mentioned tag without breaking method1() ? Of
course I still need to continue passing the method parameters (x, y
and z) as tag attribute values.
I know I should refactor the whole thing, but this is not practical at
the moment.
Thanks for any pointers..
Jake
I’ve been recently asked to maintain a legacy application with lots of
scriptlet code.
Here is the snippet that I need help with:
<%!
public void method1 (String x, String y) {
String z = method2();
doComplexStuff(x, y, z);
}
%>
method1 is being called from numerous places in this (very) large JSP
file. I need to replace the doComplexStuff() method with a custom tag
that looks something like this:
<xyz:doComplexStuffTag x="value1" y="value2" z="value3" />
Is there a way to replace the fourth line, i.e the doComplexStuff
(x,y,z) call, with the mentioned tag without breaking method1() ? Of
course I still need to continue passing the method parameters (x, y
and z) as tag attribute values.
I know I should refactor the whole thing, but this is not practical at
the moment.
Thanks for any pointers..
Jake