PDA

View Full Version : Going to start my first SpringMVC project - sadly on 1.4 so question..


rickcr
Sep 11th, 2007, 10:27 AM
Just started work at a new company. Was told we have to remain on Java 1.4 (they aren't ready to upgrade - corporate politics etc, bla bla). I will still hopefully get to use SpringMVC for the web framework.

I couldn't tell from my brief exploration of Spring's site what requirements Spring 2.0 has. Does it require Java 5 ? If it doesn't, can summarize what features won't be available to me (so I can know what to ignore in my first look at working with the framework.) Should I just stick to Spring 1.x ?

Thanks a bunch.

infinity2heaven
Sep 11th, 2007, 10:53 AM
Welcome to the club of Corporate ****!

In a recent assignment at a top financial firm, I've faced similar issues. They still remain on Java 1.4.2 (which I understand as they cannot change their production environment overnight). However, the good news is that Spring 2.x doesn't *need* java 1.5 at runtime. It does need it to compile the source though. After a week's 'battle' I convinced my manager to move to 2.x and I'm glad we did.

Have a look at the what's new section (http://www.springframework.org/docs/reference/new-in-2.html)in the reference documentation. I personally feel the following features are good enough reasons to migrate even if it's java 1.4

- form tag library
- xml schema configuration
- enhanced AOP support
- enhanced hibernateTemplate and jdbcTemplate
- sensible defaulting in MVC (aka RoR)
- declarative transactions in xml

As for the migration itself, it's as good as replacing the jar. I did end up rewriting the context files as I prefer the schema notation than the doctype.
I'd seriously recommend you've got to move onto 2.x as they've stopped supporting 1.x versions. An easy way to terrorize Managers is

"I believe there is no support for 1.x anymore, so it might be risky". Trust me, it worked.

Good luck in convincing your Manager :)

rickcr
Sep 11th, 2007, 11:21 AM
However, the good news is that Spring 2.x doesn't *need* java 1.5 at runtime. It does need it to compile the source though.


Ok, thanks for the info. Hopefully, I can at least win the battle of letting the devs build with 1.5. I just have to make sure they remember to set their javac target='1.4' in the build scripts. (We have to work with an offshore team on this and I hope there doesn't become issues were people are checking 1.5 code, but we'll see how it goes.)

rickcr
Sep 12th, 2007, 02:49 PM
Can Spring2.0 MVC also run using JSP 1.1 and Servlet 2.3 ?

I think I'm already running into issues running on this old stuff here at work. (The mvc-convention application is already complaining when I try to deploy it to tomcat4 (built with java1.4)

This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application )