- I have a GWT dynamic web project and I generate the .war file
- I test it on a Tomcat in localhost, works fine.
- I upload it to Amazon Web Services, Elastic Beanstalk running an Apache Tomcat 6
- When I run the deployed version in AWS, it cant find the servlets, like they don’t exist
- Tried it with a new GWT project, still wont work: “Servlet not found”
I’m kind of stuck. I’m not sure if this is a GWT issue or if I’m doing something wrong with AWS-Elastic Beanstalk.
Any help is appreciated.
So I found the solution after doing a lot testing and stuff:
A Tomcat 6 is whats running under the hood in elastic beanstalk and by default, when you upload a XYZ.war file to a Tomcat, the context-url is (context-root)/XYZ.
I was uploading a war named MyWebProject.war, so to Tomcat, it is deployed on (context-root)/XYZ but to elastic beanstalk, it is deployed to YOUR_URL.elasticbeanstalk.com
This obiously causes the web.xml to get confused in a really weird way, so tu summarize:
Rename you XYZ.war to ROOT.war and upload it. That should fix the problem.