B4J Library [B4X] xHttpServer (Http Server + jQuery)

GiovanniO

Member
Hi @Star-Dust , I'm also experiencing the problem mentioned above. When I try to upload a file from my PC to my browser, I get an error:

Error:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
** Activity (main) Resume **
New connection: 192.168.1.74 Counter: 1
New connection: 192.168.1.74 Counter: 2
Request URI: /fileupload.html
Request URI: /
Request URI: /styles.css
Request URI: /icon.png
Request URI: /favicon.ico
Request URI: /fileupload.html
Request URI: /stile.css
Request URI: /favicon.ico
New connection: 192.168.1.74 Counter: 3
index -1
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
    at b4a.example.servletrequest._vvvv6(servletrequest.java:129)
    at b4a.example.servletrequest._vvvvvv0(servletrequest.java:1232)
    at b4a.example.servletrequest._vvvvvv3(servletrequest.java:754)
    at b4a.example.servletrequest._vvvvvv7(servletrequest.java:1150)
    at b4a.example.servletrequest._astream_newdata(servletrequest.java:266)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA$2.run(BA.java:395)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:249)
    at android.os.Looper.loop(Looper.java:337)
    at android.app.ActivityThread.main(ActivityThread.java:9515)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:636)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1005)
index -1
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
    at b4a.example.servletrequest._vvvv6(servletrequest.java:129)
    at b4a.example.servletrequest._vvvvvv0(servletrequest.java:1232)
    at b4a.example.servletrequest._vvvvvv3(servletrequest.java:754)
    at b4a.example.servletrequest._vvvvvv7(servletrequest.java:1150)
    at b4a.example.servletrequest._astream_newdata(servletrequest.java:266)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at anywheresoftware.b4a.BA$2.run(BA.java:395)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:249)
    at android.os.Looper.loop(Looper.java:337)
    at android.app.ActivityThread.main(ActivityThread.java:9515)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:636)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1005)

This is what's happening to me with the example, i don't change nothing, and the file I'm trying to upload to the Android is 250kb.

Do you have any idea what might be wrong?

P.S.: Congratulations, it's a great project. I really like how you grouped several web "pages" with different functionalities into a server running on Android server.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…