I have small ajax problem related to cross domain as i see it.
On localmachine i created html example with some ajax: in registration text field user types \'username\',
You need to use a domain-relative URL in your Ajax request:
/Dinamicki1/UsernameServlet?username=zik
Or a context-relative URL (assuming that the page is served from /Dinamicki1):
/Dinamicki1
UsernameServlet?username=zik
With regard to "Ajax tutorial for Java", start here: How to use Servlets and Ajax?