I’ve made a very small web app with eclipse, including
- HomeServlet.java
- home.jsp
- web.xml
just echo’ing Hello world!. I’ve made my own build.xml file, and it’s building succesfull.
So now I’ve got my build folder, where HomeServer.class is located, and my web folder, where home.jsp is located.
I’ve downloaded Tomcat 7 (and got it working at localhost:8080), how can I configure my server.xml in a way that I can view my app at something like: localhost/app/home ? I’m running Windows
You don’t need to configure anything in Tomcat. You should just create a directory structure like the following, and drop this directory in the webapps folder of Tomcat:
This is the structure of a standard Java EE webapp. It’s described in every tutorial about Java EE webapps, and in Tomcat’s documentation.
Note that it’s a good idea to rely on Ant, Gradle or Maven to build your app, but that Eclipse (in its enterprise edition) supports Java EE webapps, and can create this structure for you and deploy the app directly from the IDE.