Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Alan Faulkner

+ Follow
since Feb 02, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alan Faulkner

Hi all,

Rebuilding an old SpringMVC app of mine, this time using Hibernate and annotation-based configuration. I've set up a controller class with the following URL mappings:

Now, I'm new to annotation based controllers, so the following is the line I believe should be included in the applicationContext in order for the container to detect annotated controllers:

Right, so here's the problem. When I try and access the URL from firefox, it returns an error page stating that "The page isn't redirecting properly".

I tried increasing the redirect limit on firefox to no avail. I also used the 'LiveHTTPHeaders' plugin to check out the redirect headers:

HTTP/1.1 302 Moved Temporarily

Server: Apache-Coyote/1.1

Location: http://localhost:8080/spring-FlyPOST v5.0/event

Content-Type: text/html

Transfer-Encoding: chunked

Date: Thu, 19 May 2011 19:11:17 GMT

From the full readout, it would seem that every redirect points to the same URL that I enter in the first place. Anyone have any idea whats goin on here?

9 years ago
Thanks very much for your reply Ashutosh, I'll try that out tonight and let you know how I get on.
9 years ago
Hey folks,

Wondered if anyone could help me out. I'm quite new to Java EE and I'm struggling a bit with some form processing in a Spring web app I'm building.

Basically the form is taking several pieces of textual input and mapping these onto fields in the model bean as expected. No biggie.

But one of the fields in the bean is not of type String, its of type Date. While text entry is certainly not the ideal format for entering a date, thats a whole other issue
I'm gonna worry about later.

What I want to know is, how can I get my JSP to take form input and package it into a date object? Or any object for that matter; and allow this object
to be passed to a field in the model class.

Apologies if my explanation is a bit sparse, at the moment I'm not sure what stuff I'm dealing with is Spring and which is plain Java EE.

Anyway, I've attached the relevant code snippets below:



Model Class

Servlet Mapping XML

9 years ago