ajax problem - 200 OK in firebug but red message with no response body

前端 未结 6 1748
一个人的身影
一个人的身影 2021-02-18 16:21

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\',

6条回答
  •  面向向阳花
    2021-02-18 16:37

    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):

    UsernameServlet?username=zik

    With regard to "Ajax tutorial for Java", start here: How to use Servlets and Ajax?

提交回复
热议问题