Indeed, this doesn't work if there's no Errors instance in the model. =
The fallback of looking for the plain command object always looks for a =
request attribute. I've just changed this to first check the model map =
if any; it should work with Velocity and FreeMarker too now.
Thanks for spotting this!
Juergen
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Roberto Cosenza
Sent: Monday, November 22, 2004 4:55 PM
To: spr...@li...
Subject: [Springframework-developer] VelocityContext and HttpRequest
I found a problem in the VelocityView.
I have a login form using the #springFormInput macro.
After submitting the form with bad credentials, the form is re-shown.=20
The model contains the instance of the refused user. (I'm sure of this, =
I can access it "manually" from the VelocityContext).
Anyway, the macro throws the following exception:=20
javax.servlet.ServletException: Invocation of method 'getBindStatus' in =
class org.springframework.web.servlet.support.RequestContext threw =
exception class java.lang.IllegalStateException :=20
Neither Errors instance nor plain target object for bean name command =
available as request attribute
This is because it tries to look for the (refused) command in the =
request, but nobody has put it in the request.
I thing that the VelocityView does NOT do what the InternalResourceView =
does exposing the model as request parameters, causing the problem.
Please check it out,
/rob
--=20
Roberto Cosenza
Infoflex Connect AB, Sweden
Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861
--
Nordic Messaging Technologies is a trademark of Infoflex Connect.
Please visit www.nordicmessaging.se for more information about our
carrier-grade messaging products.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.=20
http://productguide.itmanagersjournal.com/
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|