English 中文(简体)
jersey Viewable and c:import tag lib
原标题:

Giver a resource class that has a method witch returns a Viewable (or generaly any jsp page). Is there a way to use the c:import or jsp:include taglib to include a Viewable response from a jaxrs anotatted class? For example given the class

@Path("/some/path")
public class SomeJaxrsResource {
  @GET
  public Viewable get() {
    return new Viewable("/the/path/to/the/jsp", this)
  }
}

Is there a way to include it s computed html within a jsp with a

<c:import url="/some/path" /> 

or a

<jsp:include page="/some/path" />
问题回答

Since Jersey 1.3 this works, at least with URLs under management of Jersey. This was listed as fixed in the changelog

A quick test revealed that it also works with external URLs and URLS in the same servlet context but not under management of Jersey.

After some searching, I can say that this is not yet possible!





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签