I’d like to upload images to the server, store them in file system (outside server) and then display them on my JSF page.
I’d like to find something like this:
<?xml version="1.0" encoding="UTF-8"?>
<Context allowLinking="true" cookies="true" crossContext="true" override="true">
<Resources allowLinking="true"
className="com.triplemind.site.engine.SourceResolverContext"
homeDir="/home/myapp/files" />
</Context>
I found some solutions, but I wonder if there is a better way to do this.
- Configure static resources in JBOSS AS 7 (not answered)
- Replacement for context.xml in AS7? Access files outside the
WAR? (not answered)
There are jBoss documentation I’ve found:
Any help will be appreciated. Thanks in advance
Finally, I’ve decided to use FileServlet implemented by BalusC (link). This solution suits me for now. I’ve only changed its
basePathto some certain path on my server.