Pax Web Whiteboard welcomefile problem
HI,
j'ai un petit projet qui utilise Pax Web Whiteboard
mais je n'arrive pas à activer les welcome pages
le pom
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fr.sekaijin.osgi.web</groupId>
<artifactId>modules</artifactId>
<version>0.0.1</version>
</parent>
<artifactId>main</artifactId>
<name>Sekaijin :: Web :: Module :: Main</name>
<description>Sekaijin - Web - Main</description>
<packaging>bundle</packaging>
<properties>
<module.name>main</module.name>
</properties>
<dependencies>
<dependency>
<groupId>fr.sekaijin.osgi.web</groupId>
<artifactId>main.api</artifactId>
<version>0.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.web</groupId>
<artifactId>pax-web-extender-whiteboard</artifactId>
<version>3.2.9</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${web.context}-${module.name}</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<Web-ContextPath>${web.context}</Web-ContextPath>
<Webapp-Context>${web.context}</Webapp-Context>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project> |
le blueprint
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean class="fr.sekaijin.osgi.web.main.Activator" init-method="start" destroy-method="stop">
<argument type="org.osgi.framework.BundleContext" ref="blueprintBundleContext" />
</bean>
<service id="welcomeFileService" interface="org.ops4j.pax.web.extender.whiteboard.WelcomeFileMapping">
<bean
class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultWelcomeFileMapping">
<property name="redirect" value="false" />
<property name="welcomeFiles">
<array>
<value>index.jsp</value>
<value>index.html</value>
</array>
</property>
</bean>
</service>
<service interface="org.ops4j.pax.web.extender.whiteboard.ResourceMapping">
<bean
class="org.ops4j.pax.web.extender.whiteboard.runtime.DefaultResourceMapping">
<property name="alias" value="/${web.context}/${module.name}/static" /> <!-- http path -->
<property name="path" value="/local" /> <!--Local Folder within jar -->
</bean>
</service>
</blueprint> |
le fichier index.jsp est dans le dossier resources la propriété web.context = osgi
lorsque j'ouvre l'url http://localhost:8181/osgi/index.jsp pas de pb le contenu de la jsp s'ouvre correctement et fonctionne sans difficulté. mais impossible d'ouvrir
http://localhost:8181/osgi
j'ai essayé avec la propriété redirect à true ou à false sans success.
J'ai surement oublié un point mais je ne vois pas.
A+JYT