My solution to sending XML back to the client was to create create an XmlView class:
public class XmlView implements View {
Log log = LogFactory.getLog(XmlView.class);
public String...
Type: Posts; User: huijzer; Keyword(s):
My solution to sending XML back to the client was to create create an XmlView class:
public class XmlView implements View {
Log log = LogFactory.getLog(XmlView.class);
public String...
I think you have to make a distinction here between Spring and Spring MVC. In my opinion:
1. Combining Struts with Spring is fine.
2. Combining Struts with Spring MVC is not advisible. Both are MVC...
As I understand Spring MVC, the second option is the way to go. Subclass SimpleFormController and put the call in the onSubmit() method.
public class MyController extends...
Hi all,
I am building a Web App using Spring MVC and Hibernate. I use OpenSessionInView and transactions.
One of my pages is an edit-screen. My controller retrieves the relevant object from...
And now I only have one query again :-)
Thanks for your help!
Hi all,
I use Spring MVC with hibernate to create a web-based application. I use OpenSessionInView and have transactions enabled.
My domain model consists of two classes, namely Artist and...
Spring 2.0 supports asynchronous receiving of JMS messages without use MDB's. See for some more info:
http://blog.springframework.com/benh/archives/2006/04/09/spring-20s-jms-improvements/
thanks, that was exactly what i was looking for!
Hi all,
I have defined my SimpleUrlHandlerMapping bean:
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">...
I think you have an error in your referenceData() method.
The following code should work:
protected Map referenceData(HttpServletRequest request) throws Exception {
Map reference = new...
Of course there are several ways to accomplish this in Spring, but this is how I solved this problem.
Assuming you use a SimpleFormController that uses a JSP 2.0 view, you could do the following...
I have implemented this solution and the "{0}" part gets correctly filled with the name of the field that caused the error. The next question I have is this: how can I get Spring to use a user...
Thanks, that worked!
Hi all,
I am writing a custom property editor that can handle the binding of a form parameter to a specific domain model object. This property editor needs to access the spring application context...
That was exactly what I was looking for. Worked perfectly!
Hi all,
I have registered a CustomNumberEditor in my Controller that enables me to have optional Integer properties.
protected void initBinder(HttpServletRequest request,...
The formatting of your numbers could be done in the JSP using the JSTL taglib.
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
<fmt:formatNumber value="${amount}"...
Have a look at Acegi Security (http://acegisecurity.sourceforge.net/). This is a security framwork written on top of Spring.
Arjan
Thanks!
Please have a look the documentation for the spring tags:
http://www.springframework.org/docs/taglib/index.html
The status.errorMessage is only available for the <spring:bind> tag. When using...
Rob,
Why not use security to restrict access to certain resources, such as account.htm. If someone is trying to access this resource you can direct them to a login page.
There are of course...
Chris,
I am very interested in your solution. Especially since it does not seem to rely on JavaScript. Is it possible to post the code of your Controller?
Thanks in advance!
Arjan Huijzer
Somehow Spring cannot retrieve the object represented by "answer" from your request.
<property name="commandName"><value>answer</value></property>
This property tells Spring to bind all...
Try replacing:
<input type="hidden" name="memberId" value="${model.member.memberId}" />
with the following line:
Do you have any view resolvers defined in your application-servlet.xml file. Spring uses these view resolvers to map an view name to a specific view. I think such a view resolver might be responsible...