users@jersey.java.net

[Jersey] SpringServlet and Viewables (JSPTemplateProcessor)

From: Cemo Koc <cem.koc.fwd_at_gmail.com>
Date: Tue, 10 Nov 2009 02:18:01 -0800 (PST)

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.