Solved

How to add an alias directory?

Posted on 2011-03-12
5
1,439 Views
Last Modified: 2013-12-02
I have an application that runs in Tomcat 5.5. To access the application I use a url like this:

http://company.com:8080/appname

This application stores images on a different drive on the server. I would like to an alias so I can acess the images like this:

http://company.com:8080/appname_images

What file needs to be edited and what is the syntax?

Thanks
0
Comment
Question by:greddin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 35118493
0
 

Author Comment

by:greddin
ID: 35119039
hmm, I added this under the <Host> section of my server.xml:

<Context path="/myimages"
             docBase="c:\path\to\images"
             reloadable="true"
             crossContext="true" />

Then I restarted Apache Tomcat but I get Http 404 when I try to hit the url

HTTP Status 404 - /myimages/
--------------------------------------------------------------------------------
type Status report
message /myimages/
description The requested resource (/myimages/) is not available.


0
 
LVL 92

Expert Comment

by:objects
ID: 35119053
is there an index.html file i that directory?
try specify a path to one of the images
0
 

Author Comment

by:greddin
ID: 35119196
Ah, it was working. You're right, there isn't an index.htm but I can reference my images when I added one to the url.

Thanks for your help.
0
 

Author Closing Comment

by:greddin
ID: 35119197
Thanks again.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question