Hello,
I developed a small JAX-RS app that worked fine when deployed in Jetty. Now
when I try to deploy this in Websphere 7.0.0.3,
I ran into the following issues
a) static files are not accessible even though I have the following entry in
web.xml
<filter>
<filter-name>JerseyFilter</filter-name>
<filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.brocade.webportal.common;com.brocade.webportal.myAccount.resource;com.brocade.webportal.myHome.resource</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(image|css|js|dojo)/.*</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JerseyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
b) When I try to access uri "
http://localhost:9084/GuicyMyBrocadeWeb/login",
it prefixes "/" by default for certain resources ("
http://localhost:9084/GuicyMyBrocadeWeb/login/"). The wierd thing is that
this happens only for a few URIs. And this triggers two GET requests
i) one for "
http://localhost:9084/GuicyMyBrocadeWeb/login" - Firebug
showed me 302 status
ii) one for "
http://localhost:9084/GuicyMyBrocadeWeb/login/") - 404
status
Not sure if I need to set
'com.ibm.ws.webcontainer.invokeFiltersCompatibility' to true in WAS 7.0.0.x.
Anyway setting it to true
also did not work. The logs indicate Jersey got initialized correctly.
[10/9/09 21:57:45:575 PDT] 00000017 PackagesResou I Scanning for root
resource and provider classes in the packages:
com.brocade.webportal.common
com.brocade.webportal.myAccount.resource
com.brocade.webportal.myHome.resource
[10/9/09 21:57:45:591 PDT] 00000017 PackagesResou I Root resource classes
found:
class com.brocade.webportal.myHome.resource.MyHomeResource
class com.brocade.webportal.myAccount.resource.HelloWorldResource
class com.brocade.webportal.common.resource.LoginResource
class com.brocade.webportal.myAccount.resource.MyAccountResource
class com.brocade.webportal.common.resource.UserResource
class com.brocade.webportal.common.resource.MenuResource
[10/9/09 21:57:45:606 PDT] 00000017 PackagesResou I Provider classes
found:
[10/9/09 21:57:45:794 PDT] 00000017 WebApplicatio I Initiating Jersey
application, version 'Jersey: 1.1.2-ea 08/25/2009 04:39 PM'
Googling also did not help me much. Did somebody get Jersey up and running
on WAS 7.0. Help would be really appreciated here. I would really like to
use
Jersey for my new Apps
Thanks
Dinesh