Hi Kevin,
The URI path "/items/${i.key}" references a resource (served by the
Bookstore application) it does not reference a JSP file.
If the resource corresponds to an instance of the Book class, then the
following JSP will be utilized:
/com/sun/jersey/samples/bookstore/resources/Book/index.jsp
and the model passed to the JSP will be the instance of Book.
So in this respect "jsp:include" does not make any sense because it is
the Jersey application managing the URLs and there is no direct
relationship between those URLs and JSP pages.
Paul.
On Aug 23, 2009, at 5:04 AM, Cheng Zhang wrote:
> Hi,
>
> I took the bookstore example and changed the index.jsp for class
> Bookstore as below,
>
> change:
> <c:forEach var="i" items="${it.items}">
> <li><a href="items/${i.key}">${i.value.title}</a>
> </c:forEach>
>
> to:
>
> <c:forEach var="i" items="${it.items}">
> <jsp:include page="/items/${i.key}"/>
> </c:forEach>
>
> but got exception
> com.sun.jersey.api.container.ContainerException:
> java.io.FileNotFoundException: /bookstore/items/1
>
> So is it possible to include another resource in the view of a
> particular resource? Or is there any workaround to achieve it?
>
> Thanks a lot,
> Kevin
>
>