Hi Sven, it is not working because the file: resource prefix does not support relative paths. The file path must be absolute. That is, instead of:
file:src/main/resources/shiro.ini it would be file:C:\Users\Les\projects\myproject\src\main\resources\shiro.ini Now even if relative paths worked, it wouldn't make sense in your web.xml - the servlet container is free to place your war file wherever it wants on the file system, and then your relative path would be unknown. It doesn't even have to unzip the .war file, in which case a relative path doesn't make any sense at all. This is why absolute paths are supported: if a war is exploded or remains compressed, an absolute file can still be resolved. But for maven projects, the easiest thing is to do what slott and fav have recommended. Remove the ShiroFilter init-params and just put your shiro.ini in src/main/resources. That should be good enough. Cheers, Les On Fri, Sep 24, 2010 at 4:45 AM, 0xsven <[email protected]> wrote: > > > > > Hi, > > I try to exclude my ini section into a file. I have a standard maven web > project and want to put the shiro.ini file into the src/main/resources > folder. > > I tried to to it like that: > > <init-param> > <param-name>configPath</param-name> > <param-value>file:src/main/resources/shiro.ini</param-value> > </init-param> > > But it couldn't find it :-( what's wrong with my config? > > Thank you > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/setting-path-to-shiro-ini-tp5566471p5566471.html > Sent from the Shiro User mailing list archive at Nabble.com. >
