Jump to content

Recommended Posts

Posted (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/myendpointurl
with 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 by cridus
  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

Can I bump this? >_>

 

Edit: Or should I open a new thread, at this point?

Edited by cridus
Posted

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).

Posted

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.

Posted (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 by cridus
Posted

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).

Posted

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.

Posted

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/getcheaters
Result: 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/getcheaters
I 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...

Posted (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 by cridus
Posted

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.

Posted

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".

Posted

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.

Guest
This topic is now closed to further replies.

×
×
  • Create New...