Jump to content

[Solved] The deployment of my .war file failed


cridus

Recommended Posts

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
Link to comment
Share on other sites

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...