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