Spring and returning protected resources
===

I have a pretty standard Spring 3.0.7 web app

The structure is like this 

    WebContent/
        resources/
          myStaticConent/
        WEB-INF/
           views/
           myProtectedContent/


I am using the `<mvc:resources>` configuration for the static content and my controllers get views using the InternalViewResolver from WEB-INF/views

Now I have a requirement to return non-JSP content ( JPGs,PNGs,HTML,etc ) from a protected directory in WEB-INF

So a user might enter a URL like http:myWebApp/myProtectedContent and hit my protected content controller.

    @Controller
    public class HelloWorldController {

    @RequestMapping(value="/myProtectedContent")
    public String index() {
      return "myjpg.jpg";
     }
    }

Essentially I want to conditionally serve a file just like I would a view. Anyone know how this can be done ? 

I looked at some of the other methods here, Streaming using Inputstream seems overkill for files that are essentially static. Can i register another "view" type ? I need this to appear l( from the web browser side ) like a standard http request response ( like the current view implementation).

