You haven't put the www folder in the correct place.
Thank you Erel. I've tried to understand where is the correct place.
Then, as first thing, reading
post #1 of this thread and following the hint of JoséJ. Aguilar, I've turned back in "web" directory instead of "public" and put everything in apposite "srvHelloWorld", with the aim to separate this project by every other thing:
and then updated the task:
nohup /var/packages/Java8/target/j2sdk-image/bin/java -jar /volume1/web/srvHelloWorld/HelloWorld8.jar > /volume1/web/srvHelloWorld/nohup.out
I've also put a Log command in b4j project:
srvr.StaticFilesFolder = File.Combine(File.DirApp, "www")
Log(File.DirApp)
srvr.LogsFileFolder = File.Combine(File.DirApp, "logs")
srvr.AddHandler("/hello", "HelloPage", False)
srvr.AddHandler("/FormExampleHelper", "FormExampleHelper", False)
srvr.AddHandler("/FileUpload", "FileUpload", False)
thinking that maybe this would have given me some more info.
I've tried to put the "www" folder in:
- same folder where HelloWorld8.jar is (i.e. as subfolder - please see image above)
- same folder where folder containing HelloWorld8.jar is (i.e. both "www" and "srvHelloworld" folders are in "web" folder)
- in the main directory of NAS (i.e. "www" folder at same level of "web" folder)
Then, I've restarted the NAS.
But without success.
The command Log(File.DirApp) returns me a simple "/" in noh.out file (nothing that the 404 error doesn't already give me) a part the other log command "Server started".
Maybe should I change something in the code to adapt it to NAS architecture?