I need to configure Tiles and Velocity with springMVC 3.0, I think I need a complete example
on how to configure them together.
I recently went through this and described all my findings on my blog. See Integrating Spring, Velocity and Tiles
Related
I have apache tiles used in my Spring MVC project that is currently using Spring 4, but I need to migrate to Spring 6. While migrating I need to keep my views same as it will take a lot of efforts, but Spring 6 does not have Tiles support. Please suggest way out.
Will the jsp support with import or include work in this case.
I know that Velocity is no longer supported in the latest Spring, but I need Velocity in my project. Therefore, I am trying to use Spring 4.x.
Can you please provide information on which versions of Velocity are supported by Spring 4.x?
Spring itself dropped support for Velocity in Spring 5.0, so Spring itself supports it upto Spring 4.3.x. In Spring 4.3 you can use Velocity 1.7, newer version might work but nothing is guaranteed.
There is also the spring-velocity-support package which aims at some Spring support. I'm not entirely sure what is in that.
According to you what are the risks of using Spring 4 with the jersey-spring3 integration module?
I have tried to use Spring 4.0 with the jersey spring example and the example still works but i'm unable to identify risks linked to this usage.
I have started using Jersey 2.7 and Spring 4.0.x recently in a project. I have setup a context hierarchy to inject beans, so far, I have discovered only one limitiation but that does not seem relate to Spring 4 but rather to the module itself or the HK2 Spring Bridge.
To give more insight about my use. I have a XJC/JAXB-backed which is consumed by a common service, repository and exposed through JAX-WS, and now hopefully through JAX-RS.
The multi-context stuff works now with #Autowiredwith 2.8-SNAPSHOT. I have applied my changes and the 2.8-SNAPSHOT to 2.7. Here is the diff.
Edit (Michael-O; 2014-10-17): Here is a modified Spring module based off 2.11 with multi-context support.
Not an answer to original question, just related information
This may be a little premature, but the new Major 3.0 version of Jersey will be using Spring 4, in the new jersey-spring4 module. The new Major version will be built with Java 8. Though a new Major version will be released, the 2.x line will still be actively developed to keep support for Java 7
I'll update this post once 3.0 has been release.
For anyone interested, you can see this mailing list to see what the Jersey team has to say about the new 3.x line.
Not sure if you came across any issues but I currently face one. It is described in other thread.
Simply, using jersey-spring3 2.12 and spring 4.1.0.RELEASE in one maven project leads to following class incompatibility:
2014-09-14 01:15:44.175:WARN:oejuc.AbstractLifeCycle:main: FAILED org.eclipse.jetty.server.handler.HandlerCollection#696
db620[org.eclipse.jetty.server.handler.ContextHandlerCollection#27abb6ca[o.e.j.m.p.JettyWebAppContext#737d100a{/,file:/C
:/Users/Josef/Workspace/TransitCenter/src/main/webapp/,STARTING}{file:/C:/Users/Josef/Workspace/TransitCenter/src/main/w
ebapp/}], org.eclipse.jetty.server.handler.DefaultHandler#6968c1d6, org.eclipse.jetty.server.handler.RequestLogHandler#7
d986d83]: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependenc
yComparator()Ljava/util/Comparator;
java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparato
r()Ljava/util/Comparator;
at org.springframework.context.annotation.AnnotationConfigUtils.registerAnnotationConfigProcessors(AnnotationCon
figUtils.java:136)
I am new to Struts . Can we integrate Struts 2.0 with Spring 3.0 + . I am hearing people say "it is not possible to integrate it". Is this true .
If so is there any tutorial on the web having an example ?
edit :
There is a plugin to integrate Struts 2 and Spring 2 (struts2-spring-plugin-2.0.11.2.jar) . Do we have similar one for Struts 2 and Spring 3
Well we always can use Spring 3.x with Struts 2.x and Struts2.x has already a plug in in place to accomplish this.
here is the link Struts2 spring Integration
Struts2 use its internal DI for creation of Actions,Results,Interceptor using the plug in will delegate the call of creation of these key objects to Spring DI.
hope this will help you
edit
The Strus2 Spring Plug in works well even with Spring 3.x and we are using this in our current application it actually use your Spring jars and you have to place them in the lib.This plug in just overrides Struts2.x Object factory which is responsible for creating struts2 core component.
So just go ahead do some experiment with it and if you face problem in integrating you can always post queries here
The Spring 3.0 documentation for Struts 1.x and 2.x is here.
It's technically possible to integrate Spring with really just about anything. For example you can use the IoC container from anywhere in your code by constructing a new ClassPathXmlApplicationContext and passing in a standard context XML resource on the classpath. There's generally not a need to do that though, as it integrates pretty well with most web frameworks. It is however convenient to use for unit tests.
Since Spring 3 was released in December last year, I have been trying out the new REST features in the MVC framework for a small commercial project involving implementing a few RESTful Web Services which consume XML and return XML views using JiBX. I plan to use either Hibernate or JDBC Templates for the data persistence.
As a Spring 2.0 developer, I have found Spring 3's (and 2.5's) new annotations way of doing things quite a paradigm shift and have personally found some of the new MVC annotation features difficult to get up to speed with for non-trivial applications - as such, I am often having to dig for information in forums and blogs that is not apparent from going through the reference guide or from the various Spring 3 REST examples on the web.
For deadline-driven production quality and mission critical applications implementing a RESTful architecture, should I be holding off from Spring 3 and rather be using mature JSR 311 (JAX-RS) compliant frameworks like RESTlet or Jersey for the REST layer of my code (together with Spring 2 / 2.5 to tie things together)? I had no problems using RESTlet 1.x in a previous project and it was quite easy to get up to speed with (no magic tricks behind the scenes), but when starting my current project it initially looked like the new REST stuff in Spring 3's MVC Framework would make life easier.
Do any of you out there have any advice to give on this?
Does anyone know of any commercial / production-quality projects using, or having successfully delivered with, the new REST stuff in Spring 3's MVC Framework.
Many thanks
Glen
We use Spring 3's REST support in a production environment and are very happy with the results. We have about 1600 users and experience no performance issues.
We transitioned from Spring 2.5 (all XML configuration) to Spring 3.0 using Annotations to map our controllers and have been very pleased. Our initial tests show equal to better performance then our previous version and we've seen no bugs in the Spring code.
we have used the rest based implementation with Apache Wink and the results from the wink layer are very good.Our application was scalable with 2 clusters to 3000 requests per second.We did not face any performance issue with the wink layer.I felt that as spring does not provide a JAX-RS AKA JSR 311 we need to settle for another rest based implementation like Jersey or Restlet. If you are already using Spring3.0 please feel free to use JAX-WS support provided by spring's RestTemplate.