HappyCoding
HappyCoding copied to clipboard
Example code files under "Anatomy of a Web App" don't run
Hi, by following the tutorial Anatomy of a Web App, I have set up the exact same directory shown in the image below:
but accessing localhost:8080/HelloWorld/hello returns not-found error.
I've also tried downloading your code from here and copy-pasted it under my webapps directory, it didn't work either.
Please advise how to fix the issue, thanks :)
What happens if you visit localhost:8080/HelloWorld/index.html?
It shows the index.html content, but nothing shows at localhost:8080/HelloWorld/hello.
My file structure:

How I generate the .class file
javac -cp lib/servlet-api.jar <path-to-java-file>