Html Server sample isnot working

89 views
Skip to first unread message

Gloglas´s Studio

unread,
Dec 19, 2015, 9:14:03 AM12/19/15
to DroidScript
Why a Html web server sample is not working?
I didn't change anything and i think in 1.2b was it working. What is wrong?

Gloglas´s Studio

unread,
Dec 19, 2015, 10:27:47 AM12/19/15
to DroidScript
I can load page but the html of the page won't load.

Dave Smart

unread,
Dec 19, 2015, 11:47:54 AM12/19/15
to DroidScript
Whoops! Looks like we have broken the sample when adding the new redirect method.  You should be able to fix it by adding a dummy redirect like this:-

serv.AddRedirect( "/dummy/*", "/Html/dummy" );


Steve Garman

unread,
Dec 19, 2015, 12:10:00 PM12/19/15
to DroidScript
Spk attached of sample with Dave's workaround included
HTTPserver.spk

jgb

unread,
Jul 18, 2016, 6:15:18 AM7/18/16
to DroidScript
How to use or open this spk file?

Steve Garman

unread,
Jul 18, 2016, 6:35:57 AM7/18/16
to DroidScript
John.

You should not need it.

The problem was fixed in version 1.33 released in February.

jgb

unread,
Jul 19, 2016, 1:48:30 AM7/19/16
to DroidScript
Thanks for your reply. The HTTP Server sample is working well whenever i run it inside the IDE. My problem is when i build the HTTP Server apk and install it,  browsers from my laptop does not load the index.html file where i can upload files from my pc. The browser only displays the word "Null".
No error messages.

Dave Smart

unread,
Jul 21, 2016, 10:53:14 AM7/21/16
to DroidScript
Sounds like you need to update your APKBuilder.  

Restart DS, then re-install your APKBuilder from the plugins menu.

Steve Garman

unread,
Jul 21, 2016, 10:57:03 AM7/21/16
to DroidScript
I'm pretty sure he posted somewhere that it is a permissions issue Dave.

WebServer is not giving Storage permissions.

Dave Smart

unread,
Jul 21, 2016, 11:08:41 AM7/21/16
to DroidScript
OK, then he probably just needs to add this to the top of his code (which you have probably told him already I guess)

_AddPermissions( "Storage" )  

and/or perhaps 

_AddPermissions( "Network" ) 


Reply all
Reply to author
Forward
0 new messages