B4J Question a webserver that behaves like a traditional model

cbal03

Active Member
Licensed User
Longtime User
Does anyone know of a webserver or library that allows serving multiple directories for B4J?
One that allows for specifying serving directories outside of the application folder?
In apache 2, apache 2.4 and apache tomcat this is typically specified in a configuration file that is loaded on server startup. This file allows for virtual hosts to be created and configured (directory, port, permissions etc..).

I have tested a few webservers and libraries found in these forums and all of them have a single hard coded directory structure that appear to be unconfigurable.
Any suggestions would be greatly appreciated.

Best regards,
Chris
 

aeric

Expert
Licensed User
Longtime User
As far as I know, all servers I have seen configure only one public accessible folder if I get correctly what you mean.
 
Upvote 0

cbal03

Active Member
Licensed User
Longtime User
Thanks so much for the fast response aeric! :)

The former functionality of my b4a app uses an apache webserver to get its content for exoplayer to play and works nicely. But now I'd like to remove apache webserver from the mix.
Since traditional webserver functionality appears to be unavailable for b4j, I thought that getting the content using websockets might be possible.

I'm using websockets for connecting to b4j from a b4a app.
It is possible to have B4j send a media file to exoplayer through a socket?
If so, is there a sample somewhere I could view?

I'm unfamiliar with preparing a file for transport through a socket and handling the mobile side of receiving the file for playback.
I ran a few samples from these forums using asynchstreams but those just copy the files over to the device. I'd like for exoplayer to play the file as it arrives as though it were an http request or similar.

Are there any thoughts or pointers to get me moving in the right direction? Maybe a few steps of what is needed to achieve this?

Thanks again
 
Upvote 0
Top