Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for handling JSF 2 resource requests [SWF-1366] #551

Closed
spring-operator opened this issue Jul 20, 2010 · 1 comment
Closed

Comments

@spring-operator
Copy link
Contributor

spring-operator commented Jul 20, 2010

Rossen Stoyanchev opened SWF-1366 and commented

JSF 2 introduces a ResourceHandler API responsible for serving resources (images, javascript, css files) packaged relative to the web application root under /resources/<resourceIdentifier> or on the classpath under META-INF/resources/<resourceIdentifier>. Resources can be added on a page using the ResourceHandler API, an @ResourceDependency annotation, or through an outputScript tag in the view.

Resource requests are routed back to the servlet that's serving application request and take the form of:
/myapp/myservlet/javax.faces.resources/<resourceIdentifier>

In a Spring Web Flow application, resource requests would come back to the Spring MVC DispatcherServlet. Currently there is no support for handling such requests. The purpose of this ticket is to provide that support by delegating to the ResourceHandler implementation of the JSF runtime. It should also be possible to delegate JSF 2 resource requests to the resource handling mechanism planned for Spring 3.1 (SPR-7116, SPR-6641).


Affects: 2.1.1

Issue Links:

@spring-operator
Copy link
Contributor Author

Rossen Stoyanchev commented

Support for processing JSF 2 resource requests has been added.

A FacesJsfResourceRequestHandler is provided, which simplye delegates to the JSF 2 ResourceHandler. The handler must be mapped to /javax.faces.resource/** using a SimpleUrlHandlerMapping and a HttpRequestHandlerAdapter must be declared in the Spring MVC DispatcherServlet application context.

For the time being this configuration must be added as is shown in the webmvc-config.xml file of the booking-faces sample. A faces namespace element will be provided separately to minimize this configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants