You probably have encoding problems. A lot of software in the web application world works by default in the ISO-8859-1 (Western European) charset, which as you can tell from its name doesn't handle Farsi characters properly.
So make sure you configure everything in sight to use UTF-8 as its charset (also called "encoding"). First make sure that Netbeans saves your JSP files with UTF-8 encoding. And make sure that your JSPs declare themselves like this:
And finally read the Tomcat FAQ page about character encoding:
Character Encoding Issues and implement in particular the section starting with "In order to completely switch to using UTF-8..."