Solved

How to add an alias directory?

Posted on 2011-03-12
5
1,403 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
classpath 4 115
Java charset encoding issue 8 126
error when i compile 5 492
Books that can get me started on JAVA 2 54
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…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now