Win a copy of Rust Web Development this week in the Other Languages forum!

Skanus Meduoliai

Greenhorn
+ Follow
since Oct 24, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Skanus Meduoliai

I was unable to do so, because admin.xml already contains <Context /> tag that points to web application. But I have created another context file images.xml and IT WORKED . Thanks

As I understand this is safe way to share static resources like that?
9 years ago
It have read access right to this directory. I have tried to make this directory WAR style by adding WEB-INF folder with web.xml file, but images were not reachable.

I found another way of getting access to static images outside web application.

You need define context in server.xml inside Tomcat configuration:

server.xml (this have to go into 'Host' tag):


That way I am able to reach static images like that:


My new question would be:
This way to share static resources is safe? Does it have any disadvantages?
9 years ago
Hello, I would like to share some static images outside of web application WAR file. I found that Tomcat 7 have new functionality that allows to do that easily using new aliases system.

But for me it's not so easy to get it working as described in this site.

I am using Ubuntu 12.10 and Tomcat 7.0.32 version.

My uploaded images are stored like this:


In Tomcat configuration I have two context files: admin.xml and uploads.xml each of them looks like this:

admin.xml:


uploads.xml:


Application starts but images is not accessible. I try to access them like this:


Anybody knows how to properly use this aliases? Please?
9 years ago