Closed phasebash closed 10 years ago
I can take care of this, but I need your input on how you'd prefer this to be done.
Yes, this is very interesting, I overlooked this. In our application we are not using InternalResourceViewResolver.
I think the idea which you suggest is a good one, mapping slashes to dots.
If you have an idea how to do this, create a pull request and I will merge this into the code base. We can review and work together on your fork as well.
That sounds great. I've done this locally on a fork, and currently support prefix, suffix and other superclass properties. Luckily, it was actually simple to do.
When I'm comfortable with it (and have more unit tests) I'll push it up and will let you know.
This is appreciated. Once it is there, I will review it and let you know. We will integrate it at some point.
Hi,
Did you have some time to take a look this, I would appreciate if you could contribute this to the next release...
Sure, I'll make a pull request today.
https://github.com/mati1979/spring-soy-view/pull/14
Thanks! And thanks again for putting together this incredibly complete Soy implementation for Spring.
Merged to master.
In a vanilla Spring/JSP configuration using the InternalResourceViewResolver, requests mapped to Controllers returning POJOs or Map<String, Object> will have their views resolved to JSPs on the file system in the given prefix using the same path structure as the request.
Example Controller:
Example Config:
A request for http://localhost:8080/test/bar will resolve to a JSP in /WEB-INF/pages/test/bar.jsp. The "viewName" in this case is "/test/bar".
For spring-soy-view, a mapping to a Template within a namespace will be necessary. In the simplest case, the forward slashes could be mapped to periods.
Other UrlBasedViewResolver properties will need to be respected as well (prefix, suffix, etc).