Dear JMeter Users:

Does anyone know whether BeanShell (current bsh-2.0b2.jar file) hosted by 
JMeter 2.0.2 will allow a script to declare variables? The following BeanShell 
function fails.

${__BeanShell(String str1; String str2; str1 = "abc"; str2 = "def"; str1 = str1 
+ str2; return str1.toString(); ) }

The same code put in a function in NetBeans 3.6 succeeds:

    private static String showConcatenation () {
        
        String str1; 
        String str2; 
        
        str1 = "abc"; 
        str2 = "def"; 
        str1 = str1 + str2; 

        return str1.toString(); 
    }

    public static void main(String[] args) {
         System.out.println(KillMeNow.showConcatenation());
}

Sincerely yours,

Kyle

Reply via email to