Solved

How to add an alias directory?

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

Independent Software Vendors: 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

Suggested Solutions

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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 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