users@jersey.java.net

Re: [Jersey] SpringServlet and Viewables (JSPTemplateProcessor)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 10 Nov 2009 12:02:30 +0100

Hi,

Attached is a version of 1.1.4-ea-SNAPSHOT bookstore modified as you
have described.

It works for me when i deploy to GlassFish.

But it does not work when i use mvn glassfish:run. I think there is
something buggy with the embedded GF version being used. I get the
following error (which is independent of Spring):

SEVERE: ApplicationDispatcher[/bookstore] PWC1231: Servlet.service()
for servlet jsp threw exception
org.apache.jasper.JasperException: /com/sun/jersey/samples/bookstore/
resources/Bookstore/index.jsp(4,60) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core
  cannot be resolved in either web.xml or the jar files deployed with
this application
        at
org
.apache
.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:
73)

I am seen this before and never managed to resolve this error for
embedded GF. So i recommend not using that for now. We need to update
our dependencies and code to use the latest embedded version for v3
after it has been released.

Paul.






On Nov 10, 2009, at 11:38 AM, Paul Sandoz wrote:

> Hi,
>
> What version of Jersey are you using?
>
> Any errors in the server log?
>
> Paul.
>
> On Nov 10, 2009, at 11:18 AM, Cemo Koc wrote:
>
>>
>> Hi all and Paul :),
>>
>> I have some problem with working spring about returning Views. I am
>> not sure
>> weather I did necessary things correctly or not. But to reproduce
>> such a
>> problem, I made modificiations on bookstore example and also added
>> modified
>> project as a attachment.
>>
>>
>>
>> 1.
>>
>> I have added to bookstore sample
>>
>> <dependency>
>> <groupId>com.sun.jersey.contribs</groupId>
>> <artifactId>jersey-spring</artifactId>
>> <version>${project.version}</version>
>> </dependency>
>>
>> 2.
>>
>> Empty Application.xml is added
>>
>>
>> 3.
>>
>> I have added necessary things to web.xml (with resource packages
>> param)
>>
>> <context-param>
>> <param-name>contextConfigLocation</param-name>
>> <param-value>classpath:applicationContext.xml</param-value>
>> </context-param>
>>
>> <listener>
>>
>> <listener-
>> class>org.springframework.web.context.ContextLoaderListener</
>> listener-class>
>> </listener>
>> <listener>
>>
>> <listener-class>org.springframework.web.context.request.RequestContextListener
>> </listener-class>
>> </listener>
>> <servlet>
>> <servlet-name>Spring Service Web Application</servlet-name>
>>
>> <servlet-
>> class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</
>> servlet-class>
>>
>> <init-param>
>> <param-name>com.sun.jersey.config.property.packages</
>> param-name>
>>
>> <param-value>com.sun.jersey.samples.bookstore.resources</param-value>
>> </init-param>
>> <!--<load-on-startup>3</load-on-startup>-->
>>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>Spring Service Web Application</servlet-name>
>> <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>>
>>
>> 4.
>> mvn glassfish:run
>>
>>
>> 5. http://localhost:8080/bookstore is not working properly.
>>
>>
>> What did I made wrong? I am not sure but I suspected something in
>> JSPTemplateProcessor. But I am not sure...
>>
>> Thanks
>>
>>
>>
>> http://n2.nabble.com/file/n3978757/bookstore.zip bookstore.zip
>> --
>> View this message in context: http://n2.nabble.com/SpringServlet-and-Viewables-JSPTemplateProcessor-tp3978757p3978757.html
>> Sent from the Jersey mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>