Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing docbase?

 
Julia Irving
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I installed Apache Tomcat 4.1.24, I downloaded this new conf/server.xml document that uncommented the line:
<Context path="" docBase="ROOT" debug="0" />
Now, I want to be able to serve files that are located on my C-drive without having to copy them into my webapps/root folder. If I change docBase, will I be able to do so? If so, what do I change it to?
Thanks in advance for any help or suggestions!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rather than changing the default docbase, you create as many new contexts as you like. Here's a couple of examples from my own server.xml on a Windows box:

These are them available as
[code]
http://localhost:8080/garden/
and
http://localhost:8080/lawns/
[/code}
respectively.
hth,
bear
 
Julia Irving
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help! I added the following line by editing in word and then resaving as an .xml:

However, when I went to open the xml file up, I got an error saying invalid character found in text content.
Sorry, but I am new at this. Should I be editing the xml file some other way.
[ August 19, 2003: Message edited by: Julia Irving ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolutely! There's no telling what Word will do to a file. Most probably it's turing your quotes into so-called "smart quotes".
If you have nothing else to use, use Notepad or a similar text editor.
bear
 
Julia Irving
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It worked perfectly! Thanks a lot for all of your help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic