cridus Posted April 5, 2018 Author Posted April 5, 2018 (edited) Let's assume that my domain is "cridus10.heliohost.org", the application's name is "MyBackend" and the endpoint is "myendpointurl": I simply call http://cridus10.heliohost.org/MyBackend/myendpointurlwith a REST client and instead of receiving my call to that endpoint that has its own controller, for some reason it tries to see if there's a jsp called "myendpointurl" in the "public_html" folder. On my pc I installed Tomcat 8.5.29, which is almost the same version you have, and it works as expected, it doesn't try at all to find any jsp page. Edit: I mean, I probably can make a jsp that calls my service and prints the json instead, but it's kinda stupid, having configured a REST controller for that. Edited April 6, 2018 by cridus
cridus Posted April 9, 2018 Author Posted April 9, 2018 (edited) Can I bump this? >_> Edit: Or should I open a new thread, at this point? Edited April 9, 2018 by cridus
wolstech Posted April 9, 2018 Posted April 9, 2018 Krydos has been so busy outside of this place lately that he probably just hasn't had time to look at it (we're all volunteer after all, none of us get paid for what we do here).
cridus Posted April 9, 2018 Author Posted April 9, 2018 Okk, sorry, I just wanted to make sure I wasn't simply being ignored or that you guys didn't see I had made a new post.
Krydos Posted April 11, 2018 Posted April 11, 2018 I don't see an account with the domain cridus10.heliohost.org
wolstech Posted April 12, 2018 Posted April 12, 2018 The account cridus10 still exists, but it appears he changed his main domain to http://ds3cheatersblocker.heliohost.org/ He also no longer has Java enabled.
cridus Posted April 12, 2018 Author Posted April 12, 2018 (edited) Wooot, wait, let me check. Edit: Odd, it was active until very few days ago. Can you guys please reactivate it? Or should I request it with the button in the tomcat page? Edited April 12, 2018 by cridus
wolstech Posted April 12, 2018 Posted April 12, 2018 Please request it again. If you had Java on your current main domain or didn't change your domain, it was likely removed for lack of use (just having a WAR deployed does not constitute using it, it actually needs a meaningful amount of legitimate traffic to the resulting website as well).
cridus Posted April 12, 2018 Author Posted April 12, 2018 Ok, the problem I had was that my war couldn't receive the calls I did to it the right way. It would only look for .jsp files in the public_html folder instead of handling the calls with the REST controllers I configured. I don't know if that has to do with some particular configuration of your tomcat... On my tomcat 8.5.29 it works as it should.
cridus Posted April 15, 2018 Author Posted April 15, 2018 Ok Java is back, I deployed my war (cridus10_ds3cb.war) and tried again to call one of the endpoints I configured: http://ds3cheatersblocker.heliohost.org/ds3cb/getcheatersResult: I get a 404 error and this is what shows in the errors log in my cPanel: AH00128: File does not exist: /home/cridus10/public_html/ds3cb/getcheatersI don't understand why it's trying to look for a file in the public_html folder. Shouldn't my http calls reach my war at the "ds3cheatersblocker.heliohost.org/ds3cb" http address? Please help me solve this problem before Java expires again for me... I can't use my war to keep it active exactly because it's not receiving the calls I make to it...
wolstech Posted April 15, 2018 Posted April 15, 2018 Your path is wrong, the endpoint is actually at http://ds3cheatersblocker.heliohost.org/cridus10_ds3cb/getcheaters (the filename always goes after the main domain). It seems to somewhat work, in that it returns what appears to be empty JSON (just a [ ]).
cridus Posted April 15, 2018 Author Posted April 15, 2018 (edited) Oh, I see! I tried with just "ds3cb" because in the java page it says Deployed. http://ds3cheatersblocker.heliohost.org/ds3cb/and not Deployed. http://ds3cheatersblocker.heliohost.org/cridus10_ds3cb/I didn't think about trying with my username. (Can I not put my username in the war's name, by the way? I think someone told me it's required, but I'd prefer for people to not find out my username by looking at the http calls I make.) Thanks for the help! Edited April 15, 2018 by cridus
Krydos Posted April 16, 2018 Posted April 16, 2018 Your username always gets appended to the front of the .war file. The reason for this is you're on a multiuser system and you're not the only person with java enabled on their account. If you deployed a file named test.war and then another person deployed test.war it would overwrite your file and your website would suddenly change to their content. To prevent this your username is added to the front so cridus10_test.war is unique from other_test.war. Adding your username to the front of the .war isn't required, but if it isn't there the system renames it and deploys it that way. Some .war files don't like being renamed so if people are having trouble with cookies or paths or whatever we recommend naming it properly yourself.
cridus Posted April 17, 2018 Author Posted April 17, 2018 Ok, thanks for all the help. By the way, isn't it a bug the fact that the java page tells you the wrong context root? It told me it's "ds3cb" when it was actually "cridus10_ds3cb".
Krydos Posted April 17, 2018 Posted April 17, 2018 I manually edited the configuration file for you to see if it would help all of your issues. If you want I can change it back? The automated deployment script doesn't know about my manual changes.
Recommended Posts