Tomcat newbie question

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
 
R

Ravi

Hi,

U can refer web.xml and try to use url-pattern tag..and servlet
mappting ..tag... both will help..u to solve ur problem

Bye,
Ravi.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top