It seems like coding/syntax error. Once your JSP page gets parsed, and contents reaches to client side, it will show something like this -
var str1;
$(document).ready(function(){
$("#dir1").focusout(function(){
$(".test").hide();
alert("Value: " + $("#dir1").val());
Directory : dir1<br />
Files : my file1.doc<br />
Files : my file2.txt<br />
Files : my file3.xls<br />
Directory : dir2<br />
Files : my file4.doc<br />
Files : my file5.doc<br />
Files : my file6.doc<br />
Files : my file7.doc<br />
Files : my file8.doc<br />
});
});
As you see, the output data from your JSP is not properly quoted, and it doesn't make any sense.
Simply check the source of your generated HTML page and you will clearly see the problem.
Regards,
Niral Soni