Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Tomcat newbie question

Thread view: 
Jay - 20 Nov 2005 06:14 GMT
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
Ravi - 21 Nov 2005 05:58 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.