» Protect static files hosted on Apache with Tomcat / Java
Protect static files hosted on Apache with Tomcat / Java
|September 8, 2014
Posted by forumadmin
I’m looking for a way to protect some static content hosted on Apache.
Those static files could be downloaded only by people based on rights that are defined in a database.
I am using Spring MVC for the web application.
I tried to forward the user to the relative path of the static content after I checked that the user has the appropriate rights. But it looks like forward in servlet can’t forward to resource external to the Tomcat container. And I don’t want to host the static content inside the web application folder.
I also tried to symlink a directory outside of the web application inside the web application folder. But again, it’s not working.
The solutions I want to avoid is to redirect to the static content and then expose the actual URL of the resource on Apache which can then be access without any authorization.
I also don’t want to use Tomcat to serve the static content with a servlet reading it blocks by blocks.
More Related Questions
- Spring MVC tutorial not working I've been checking several tutorials and other helps here in stackoverflow, but I'm unable to solve this annoying problem: I created a Spring MVC project in Eclipse following this tutorial […]
- Spring 3 MVC – Url mapping not found (404) in production My app works fine on local tomcat 7 but on the prod tomcat 7 only index url ("/") and resources urls works, other urls are not found, "/login" for example.
- Tomcat ignores application.properties of Spring Boot war application deployed in standalone server I am encountering some problems, while trying to deploy a spring boot application (Spring Boot v
1.1.6), as a war, in a standalone tomcat (v 7.0.50).
I followed the tutorial […]
- Tomcat vs Pivotal tc Server Could anyone advise as to the pros and cons of using Pivotal tc Server as opposed to just vanilla Tomcat for a Spring-MVC Java web application? Could find very little about Pivotal other […]
- Only one deployment is slow in Tomcat, another runs normally/quickly Environment :
Tomcat 8 (same results in Tomcat 7)
Spring MVC 3
Oracle UCP 18.104.22.168
Windows Server 2008 R2
I have a single Tomcat 8 instance (same behavior exhibited in […]
- How to use remote location property file in spring re loadable message resource in java I have distributed system with 8 app servers running tomcat on it. It is a spring application. I want to use a property file which will located on some others server an all tomcat will […]
- Is it possible to dissalow jsp execution on tomcat + apache I have an application tomcat + apache + mod_jk + spring mvc deployed on remote server. After making request to the controller I am having jsp source code in the response. It is not related […]
- Struts2 POST Causing Connection Reset when Proxied by Apache When POSTing (or GETting) certain simple text values to our Struts2 (22.214.171.124) application when proxied by Apache HTTP server, we are getting a "The connection was reset" message within […]
- Session variable not getting set using Tomcat 7, Java MVC Whilst I was developing this website in Eclipse Kepler and a local Apache Tomcat 7 server I was able to set a session variable to determine if a user was logged in to the website.
- Class reloading leak on tomcat I take the following steps:
Create simplest servlet and force several times to reload (by modify) tomcat app, to make sure it's not tomcat realated.
Add jars to WEB-INF/lib (spring, db2 […]