jmcginn
May 27th, 2008, 02:46 PM
I have found the solution to this first post, the war file name is the default context name used I still have not found out why my context path strategy in the 2nd post does not work.
Thanks,
John
I am trying to create my first WAR bundle using Spring DM's web extender.
I have the spring osgi web and web extender bundles installed and started (1.1.0.m2).
I am a little confused on the structure of the WAR and how to install it.
I created a WAR file that looks like this:
/WEB-INF/classes - My compiled classes
/WEB-INF/web.xml
/META-INF/manifest.mf
My manifest looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyTest Plug-in
Bundle-SymbolicName: MyTest
Bundle-Version: 1.0.0
Bundle-Localization: plugin
Import-Package: javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
javax.servlet.resources;version="2.5.0"
Spring-Context: springConfig/testConfig.xml
Bundle-ClassPath: WEB-INF/classes/,
.
My web.xml looks like this:
<web-app id="MyTestApp">
<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>com.railinc.test.MyTestServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
</web-app>
I was able to install and start the WAR bundle, but I cannot seem to actually hit my servlet.
I tried /MyTest/test but got no results :(.
Am I packaging my WAR incorrectly?
Am I installing it incorrectly? Should it be a fragment attached to the web.extender?
Do I need to register any spring services?
What is the context root for this web app? The default context handler seems to indicate bundle-location is the default, but what does this mean?
Thanks
John
Thanks,
John
I am trying to create my first WAR bundle using Spring DM's web extender.
I have the spring osgi web and web extender bundles installed and started (1.1.0.m2).
I am a little confused on the structure of the WAR and how to install it.
I created a WAR file that looks like this:
/WEB-INF/classes - My compiled classes
/WEB-INF/web.xml
/META-INF/manifest.mf
My manifest looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MyTest Plug-in
Bundle-SymbolicName: MyTest
Bundle-Version: 1.0.0
Bundle-Localization: plugin
Import-Package: javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
javax.servlet.resources;version="2.5.0"
Spring-Context: springConfig/testConfig.xml
Bundle-ClassPath: WEB-INF/classes/,
.
My web.xml looks like this:
<web-app id="MyTestApp">
<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>com.railinc.test.MyTestServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
</web-app>
I was able to install and start the WAR bundle, but I cannot seem to actually hit my servlet.
I tried /MyTest/test but got no results :(.
Am I packaging my WAR incorrectly?
Am I installing it incorrectly? Should it be a fragment attached to the web.extender?
Do I need to register any spring services?
What is the context root for this web app? The default context handler seems to indicate bundle-location is the default, but what does this mean?
Thanks
John