J
Jay
I am trying to setup an webapp with Tomcat. Here is the directory
structure I think I desire for my web app:
mywebapp
mywebapp/build.xml
mywebapp/src
mywebapp/src/com
mywebapp/src/com/mycompany
mywebapp/src/com/mycompany/JavaModule.java
mywebapp/web
mywebapp/web/WEB-INF
mywebapp/web/WEB-INF/classes
mywebapp/web/WEB-INF/classes/com
mywebapp/web/WEB-INF/classes/com/mycompany
mywebapp/web/WEB-INF/classes/com/mycompany/JavaModule.class
mywebapp/web/WEB-INF/classes/log4j.properties
mywebapp/web/WEB-INF/web.xml
mywebapp/web/webstuff
mywebapp/web/webstuff/images
mywebapp/web/webstuff/images/best_photo_ever.jpg
mywebapp/web/webstuff/index.html
mywebapp/web/webstuff/myjspfile.jsp
mywebapp/web/webstuff/style.css
This is different than most webapp examples I have seen because I'd
prefer NOT putting my html, jsp, and image files right in the 'web'
folder. Instead, I'd like to wrap all of the web-related stuff a
'webstuff' folder or some such. The trick is I want to reference
everything without having to include the 'webstuff' directory in the
URL.
For instance, I want to type:
http://www.whatever.com/images/best_photo_ever.jpg
NOT:
http://www.whatever.com/webstuff/images/best_photo_ever.jpg
Can I do this with Tomcat without bringing Apache into the picture?
Also, are there more appropriate names for the folders I have called
'web' and 'webstuff'?
Thanks.
-j
structure I think I desire for my web app:
mywebapp
mywebapp/build.xml
mywebapp/src
mywebapp/src/com
mywebapp/src/com/mycompany
mywebapp/src/com/mycompany/JavaModule.java
mywebapp/web
mywebapp/web/WEB-INF
mywebapp/web/WEB-INF/classes
mywebapp/web/WEB-INF/classes/com
mywebapp/web/WEB-INF/classes/com/mycompany
mywebapp/web/WEB-INF/classes/com/mycompany/JavaModule.class
mywebapp/web/WEB-INF/classes/log4j.properties
mywebapp/web/WEB-INF/web.xml
mywebapp/web/webstuff
mywebapp/web/webstuff/images
mywebapp/web/webstuff/images/best_photo_ever.jpg
mywebapp/web/webstuff/index.html
mywebapp/web/webstuff/myjspfile.jsp
mywebapp/web/webstuff/style.css
This is different than most webapp examples I have seen because I'd
prefer NOT putting my html, jsp, and image files right in the 'web'
folder. Instead, I'd like to wrap all of the web-related stuff a
'webstuff' folder or some such. The trick is I want to reference
everything without having to include the 'webstuff' directory in the
URL.
For instance, I want to type:
http://www.whatever.com/images/best_photo_ever.jpg
NOT:
http://www.whatever.com/webstuff/images/best_photo_ever.jpg
Can I do this with Tomcat without bringing Apache into the picture?
Also, are there more appropriate names for the folders I have called
'web' and 'webstuff'?
Thanks.
-j