OSGI-INF.blueprint.blueprint.xml Maven / Gradle / Ivy
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0/blueprint-cm-1.0.0.xsd"> <!-- Registering the Forbidden Servlet first --> <bean id="forbiddenContext" class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardContext"/> <service id="forbiddenCtxtService" ref="forbiddenContext" interface="org.osgi.service.http.HttpContext"> <service-properties> <entry key="httpContext.id" value="forbidden"/> </service-properties> </service> <bean id="forbiddenServlet" class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardServlet"> <argument type="java.lang.String" value="/forbidden"/> </bean> <service id="forbiddenServletService" ref="forbiddenServlet" interface="javax.servlet.Servlet"> <service-properties> <entry key="alias" value="/forbidden"/> <entry key="httpContext.id" value="forbidden"/> </service-properties> </service> <!-- Registering the WhiteBoardServlet --> <bean id="whiteBoardServlet" class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardServlet"> <argument type="java.lang.String" value="/whiteboard"/> </bean> <service id="whiteBoardServletService" ref="whiteBoardServlet" interface="javax.servlet.Servlet"> <service-properties> <entry key="alias" value="/whiteboard"/> </service-properties> </service> <!-- Registering the RootServlet --> <bean id="rootServlet" class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardServlet"> <argument type="java.lang.String" value="/root"/> </bean> <service id="rootServletService" ref="rootServlet" interface="javax.servlet.Servlet"> <service-properties> <entry key="alias" value="/root"/> </service-properties> </service> <!-- Registering resources! --> <bean id="resourceMapping" class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultResourceMapping"> <property name="alias" value="/whiteboardresources" /> <property name="path" value="/images" /> </bean> <service id="resources" ref="resourceMapping" interface="org.ops4j.pax.web.extender.whiteboard.ResourceMapping" /> <!-- Registering Filters --> <bean id="filteredServlet" class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardServlet"> <argument type="java.lang.String" value="/filtered"/> </bean> <service id="filteredServletService" ref="rootServlet" interface="javax.servlet.Servlet"> <service-properties> <entry key="alias" value="/filtered"/> </service-properties> </service> <service id="servletFilterService" interface="javax.servlet.Filter"> <service-properties> <entry key="urlPatterns" value="/filtered/*"/> </service-properties> <bean class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardFilter"/> </service> <!-- ServletRequest Listener --> <service interface="java.util.EventListener"> <bean class="org.ops4j.pax.web.extender.samples.whiteboard.internal.WhiteboardListener"/> </service> <!-- Exceptions / Error-Page --> <service interface="javax.servlet.Servlet"> <service-properties> <entry key="alias" value="/exception"/> </service-properties> <bean class="org.ops4j.pax.web.extender.samples.whiteboard.internal.ExceptionServlet"/> </service> <service interface="org.ops4j.pax.web.extender.whiteboard.ErrorPageMapping"> <bean class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultErrorPageMapping"> <property name="error" value="java.lang.Exception"/> <property name="location" value="/uncaughtException.html"/> </bean> </service> <!-- Default Resource Mapping --> <service id="defaultResourceService" interface="org.ops4j.pax.web.extender.whiteboard.ResourceMapping"> <bean class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultResourceMapping"> <property name="alias" value="/"/> <property name="path" value=""/> </bean> </service> <!-- Welcome Files --> <bean id="welcomeFile" class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultWelcomeFileMapping"> <property name="redirect" value="true" /> <property name="welcomeFiles"> <array> <value>index.html</value> <value>welcome.html</value> </array> </property> </bean> <service id="welcomeFileService" ref="welcomeFile" interface="org.ops4j.pax.web.extender.whiteboard.WelcomeFileMapping" /> <!-- 404 mapping --> <service id="errorPageMapping" interface="org.ops4j.pax.web.extender.whiteboard.ErrorPageMapping"> <bean class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultErrorPageMapping"> <property name="error" value="404"/> <property name="location" value="/404.html"/> </bean> </service> <!-- 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" value="/jsp"/> </bean> </service> </blueprint>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy