Hi Les, Thanks for your advice. Yeah. The jar is in my application's classpath because I had make it as a Shared Library and my application is referencing to it. Now my application working great with it by adding following to web.xml:
<context-param> <param-name>shiroConfigLocations</param-name> <param-value>classpath:com/nick/shiro/security/shiro.ini</param-value> </context-param Best regards, Nick ________________________________ From: Les Hazlewood <[email protected]> To: [email protected]; lee yeushian <[email protected]> Sent: Thursday, March 8, 2012 8:01 AM Subject: Re: How to configure web.xml locate for shiro.ini which located on another external jar Hi Nick, Is that .jar file in your application's classpath? If the shiro.ini file is inside a jar, that jar _must_ be in the application's classpath. However, if the file is outside the .jar (on disk directly as its own file), you can reference the file directly as follows by adding the following to web.xml: <context-param> <param-name>shiroConfigLocations</param-name> <param-value>file:D:\shiro\whatever\shiro.ini</param-value> </context-param> This is documented here: http://shiro.apache.org/web.html#Web-CustomConfigurationLocations HTH, Les On Tue, Mar 6, 2012 at 2:20 AM, lee yeushian <[email protected]> wrote: > Hi, > > I have a external jar which consist shiro.ini that located in a D drive. > (D:\shiro\ShiroShareLib.jar) > I had follow the guides which I added context-param in my web.xml. But I > still encountered "Error 500: javax.servlet.ServletException: Filter > [ShiroFilter]: could not be initialized" > Can anyone can advice me on this how to configure my web.xml in order to > initialize my Shiro Filter? > > Thanks in advance. > > Regards, > Nick Lee
