users@jersey.java.net

Re: [Jersey] Viewable is not able to resolve pre-compiled jsp path in jersey 1.1.5

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Mar 2010 09:59:50 +0100

Hi Mahesh,

Do you know if compiled JSPs are visible to the web application,
namely can one find them by doing:

   servletContext.getResource(path)

?

If not then this might be an issue with JBoss. There should be a
correspondence between such resources and being able to create a
RequestDisptacher to forward to such a resource.

Can you send me a reproducible test case? preferably a maven-based
project.

Paul.

On Mar 9, 2010, at 4:07 PM, Mahesh Venkat wrote:

> Hi,
>
> I have two identical JBoss 4.2.0 environments with Jersey 1.1.5 In
> one of them I use jsp as is, while in anther environment I have pre-
> compiled jsp. The Viewable interface is unable to resolve the pre-
> compiled jsp.
> My jsp path is /foo/bar.jsp
>
> I have the following in web.xml:
> <init-param>
> <param-
> name>com.sun.jersey.config.property.JSPTemplatesBasePath</param-name>
> <param-value>/foo</param-value>
> </init-param>
> <init-param>
> <param-
> name>com.sun.jersey.config.feature.NormalizeURI</param-name>
> <param-value>true</param-value>
> </init-param>
> <init-param>
> <param-
> name>com.sun.jersey.config.feature.CanonicalizeURIPath</param-name>
> <param-value>true</param-value>
> </init-param>
> <!-- init-param>
> <param-
> name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
> <param-value>/(images|js|styles|(oauth/))/.*</param-
> value>
> </init-param -->
>
> In the code .. I have the following :
>
> ..
>
> String retour = "/bar.jsp";
> return new Viewable(retour, this);
>
> --
> Regards
> --Mahesh