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

前端 未结 6 1713
一个人的身影
一个人的身影 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:39

    I figured out how to solve it from this site:

    1. "To allow directory browsing via Apache Tomcat change the parameter "listings" in the file conf/web.xml from false to true."

    2. Call your page not as C:/Documents and Settings/.../page.html but as localhost:8080/your_servlet_name (page is better named index.html).

    This way, you will be able to make AJAX requests to localhost:8080/your_servlet_name/something_else.

提交回复
热议问题