struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjorkman <>
Subject Struts + Ajax validation using DWR...
Date Thu, 11 Sep 2008 15:53:27 GMT

Hi! Been searching for answers, and although I see lots of similar questions,
none of them has helped me.

Running Struts and DWR 2 I'm not able to get AJAX validation
working. DWR is correctly setup (I've tried exposing beans and the
communication works fine).

My action looks like this (excerpt):
public class RegisterEmailAction extends ActionSupport implements
SessionAware {
   @RequiredFieldValidator(key = "", message
= "")
    public String getEmail() 
        return email;

Client/Server side validation works fine.

In web.xml:


In dwr.xml:
    "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"

		<create creator="new" javascript="validator">
		<convert converter="bean"
			match="com.opensymphony.xwork2.ValidationAwareSupport" />
 import java.util.Map;
 import org.apache.struts2.validators.DWRValidator;

 DWRValidator.doPost(String, String, Map<String, String>);


My form:
	<s:form action="RegisterEmail!register" method="post" validate="true"
	  <s:textfield label="%{getText('')}" name="email" />
	  <s:submit value="%{getText('')}" accesskey="S"/>

Also of course I have <s:head theme="ajax" debug="false" /> in my header.

All that happens when I leave the input field is that onBlur kicks in and
calls validate(this), and an alert saying "null" is displayed. I see no
trace of my action being called at all, debugging logs/breakpoints are not
activated at all.

Nothing in the logs. Anyone have an idea? Should I just give it up?

Peter Björkman
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message