java - OSGi Http Whiteboard pattern -


moving web.xml osgi http whiteboard pattern created bundle-context.xml how pass below properties web.xml in jspservletfilter's osgi:service-properties

 <jsp-config>         <jsp-property-group>         <url-pattern>*.jsp</url-pattern>         <el-ignored>true</el-ignored>         </jsp-property-group>  </jsp-config> 

i tried below solution not work.

<bean id="jspservlet" class="com.test.servlet.web.servlet.testjspservlet"/>   <osgi:service ref="jspservlet" interface="javax.servlet.servlet" >     <osgi:service-properties>         <entry key="osgi.http.whiteboard.filter.name" value="jspservlet" />         <entry key="osgi.http.whiteboard.servlet.pattern" value-ref="jsppatternslist"/>         <entry key="osgi.http.whiteboard.context.select" value="(osgi.http.whiteboard.context.name=cb)" />         <entry key="servlet.init.el-ignored" value="true" />         </osgi:service-properties> </osgi:service> 

i checked 1 more time, if i'm not wrong osgi spec doesn't handle jsps in way. trying there doesn't work apache felix implementation.

the way have jsps working http whiteboard approach switch pax - web project. not supports whiteboard approach (spec compliance still work in progress, 6.0.0-snapshot) more there in spec right now.

to achieve want following needed pax-web:

<!-- jsp handling --> <service id="jspmapping" interface="org.ops4j.pax.web.extender.whiteboard.jspmapping">     <bean class="org.ops4j.pax.web.extender.whiteboard.runtime.defaultjspmapping">         <property name="urlpatterns">             <array>                 <value>/jsp</value>             </array>         </property>     </bean> </service> 

an example can found in samples of pax-web project.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -