dev@jersey.java.net

Re: [Jersey] Building a Web-App with Jersey and JSP

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 24 Mar 2010 09:31:32 +0100

On Mar 23, 2010, at 2:19 PM, Marc Hadley wrote:

> You need to configure Jersey as a servlet filter and set the
> com.sun.jersey.config.property.WebPageContentRegex property to
> exclude JSPs. Take a look at the bookstore sample for an example
> web.xml that does this.
>

Also in the 1.2-SNAPSHOT there is another config option:

https://jersey.dev.java.net/nonav/apidocs/1.2-SNAPSHOT/jersey/com/sun/jersey/spi/container/servlet/ServletContainer.html
#FEATURE_FILTER_FORWARD_ON_404

which may be more preferable in certain cases because one does not
need to mess around with regexes.

Paul.

> Marc.
>
> On Mar 23, 2010, at 8:20 AM, Wolf, Timo wrote:
>
>> Hi,
>>
>> I am building a Jersey based Web-App that also contains "normal"
>> jsp pages.
>>
>> I configured the web.xml to map all requests to the Jersey Servlet
>> Adapter.
>>
>> <servlet-mapping>
>> <servlet-name>ServletAdaptor</servlet-name>
>> <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>>
>> Now, the problem is that the JSP pages are not found.
>>
>> Is there a way to map all requests to Jersey except the *.jsp
>> requests?
>>
>> Thanks a lot,
>>
>> Timo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net
>