It depends on the operating system and the web server you are using. For example, if you are using windows with tomcat the directories will be more or less:
- tomcat
- webapps
- WEB-INF
-src
- <your package structure>
-<your file.java>
-classes
- <your package structure>
- <your file . class>
When you are using an IDE like eclipse you can configure both: the source directory and the classes output.