Hi,

I spent a couple of hours trying to get a small wicket application (6.19.0) 
running on servicemix (4.5.3 / 5.4.0) and secure it with shiro (1.2.3). The 
wicket application is running but shiro does not kick in. The internal start 
page is shown instead of the login page.

I have a working setup without OSGi but the final app requires to run on 
servicemix.

Can somebody point to a working setup?

thx for any help
harald


===== web.xml used without OSGi ======

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
         version="2.4">

  <display-name>test-web</display-name>

  <context-param>
    <param-name>configuration</param-name>
    <param-value>deployment</param-value>
  </context-param>
  <context-param>
    <param-name>shiroEnvironmentClass</param-name>
    <param-value>de.test.app.shiro.SetupIniWebEnvironment</param-value>
  </context-param>

  <listener>
    
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
  </listener>
  <filter>
    <filter-name>ShiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>ShiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <filter>
    <filter-name>test-web</filter-name>
    <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
    <init-param>
      <param-name>applicationClassName</param-name>
      <param-value>de.test.app.TestApplication</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>test-web</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

</web-app>


===== blueprint.xml used within OSGi =====


<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
           xmlns:wicket="http://www.ops4j.org/schema/wicket";>

  <wicket:application id="applicationId"
                      class="de.test.app.TestApplication"
                      applicationName=“TestApplication"
                      mountPoint="webui" />

  <bean id="shiroSetup"  class="de.test.app.shiro.SetupIniWebEnvironment"/>

  <bean id="shiroFilterFactory" 
class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
    <property name="securityManager" ref="securityManager" />
  </bean>

  <bean id="securityManager"            
class="org.apache.shiro.web.mgt.DefaultWebSecurityManager"/>
  <bean id="lifecycleBeanPostProcessor" 
class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>

</blueprint>

Reply via email to