W wl Well-Known Member Licensed User Longtime User Mar 3, 2014 #1 hi, Following another thread in the b4a forum: as I intend to have a b4a server which is more or less compatible with a b4j server: would it be possible for the b4j server to treat all files by server-side code? As I understand in the b4j server you need to specify the paths for which you want server-side code to be executed (module). Or is there a way to have the b4j server server all possible urls though a method ? As always: thanks !
hi, Following another thread in the b4a forum: as I intend to have a b4a server which is more or less compatible with a b4j server: would it be possible for the b4j server to treat all files by server-side code? As I understand in the b4j server you need to specify the paths for which you want server-side code to be executed (module). Or is there a way to have the b4j server server all possible urls though a method ? As always: thanks !
Erel B4X founder Staff member Licensed User Longtime User Mar 4, 2014 #2 You can do something like: Code: Copy srvr.AddHandler("/files/*", ... This handler will handle all requests that start with /files/. You can use Request.RequestURI to find which file was requested. Upvote 0
You can do something like: Code: Copy srvr.AddHandler("/files/*", ... This handler will handle all requests that start with /files/. You can use Request.RequestURI to find which file was requested.
W wl Well-Known Member Licensed User Longtime User Mar 4, 2014 #3 Thanks Erel, I was unaware I could use wildcards Wim Upvote 0