File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
struts2-archetype-blank/src/main/resources/archetype-resources/src/test/java/example
struts2-archetype-starter/src/main/resources/archetype-resources/src/main Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2222import com .opensymphony .xwork2 .config .RuntimeConfiguration ;
2323import com .opensymphony .xwork2 .config .entities .ActionConfig ;
2424import com .opensymphony .xwork2 .config .entities .ResultConfig ;
25+ import com .opensymphony .xwork2 .config .providers .XmlConfigurationProvider ;
2526import org .apache .struts2 .config .StrutsXmlConfigurationProvider ;
2627import org .apache .struts2 .junit .StrutsTestCase ;
2728
Original file line number Diff line number Diff line change 1616package $ {package };
1717
1818import org .apache .struts2 .util .StrutsTypeConverter ;
19+ import org .apache .struts2 .conversion .TypeConversionException ;
1920
2021import java .text .SimpleDateFormat ;
2122import java .text .ParseException ;
2223import java .util .Map ;
2324import java .util .Date ;
24- import com .opensymphony .xwork2 .conversion .TypeConversionException ;
2525
2626public class DateConverter extends StrutsTypeConverter {
2727 public Object convertFromString (Map context , String [] values , Class toClass ) {
Original file line number Diff line number Diff line change 1717
1818import java .util .Date ;
1919import com .opensymphony .xwork2 .ActionSupport ;
20- import com .opensymphony .xwork2 .validator .annotations .Validation ;
2120import com .opensymphony .xwork2 .validator .annotations .RequiredStringValidator ;
2221import com .opensymphony .xwork2 .validator .annotations .RequiredFieldValidator ;
2322import com .opensymphony .xwork2 .conversion .annotations .Conversion ;
2423import com .opensymphony .xwork2 .conversion .annotations .TypeConversion ;
2524
2625@ Conversion ()
2726public class HelloWorldAction extends ActionSupport {
28-
27+
2928 private Date now ;
3029 private String name ;
31-
30+
3231 @ TypeConversion (converter = "${package}.DateConverter" )
3332 @ RequiredFieldValidator (message = "Please enter the date" )
3433 public void setDateNow (Date now ) { this .now = now ; }
3534 public Date getDateNow () { return now ; }
36-
35+
3736 @ RequiredStringValidator (message = "Please enter a name" , trim = true )
3837 public void setName (String name ) { this .name = name ; }
3938 public String getName () { return this .name ; }
40-
39+
4140 public String execute () throws Exception {
4241 return SUCCESS ;
4342 }
Original file line number Diff line number Diff line change 4747 <!-- Servlets -->
4848 <servlet >
4949 <servlet-name >dwr</servlet-name >
50- <servlet-class >uk.ltd.getahead.dwr.DWRServlet </servlet-class >
50+ <servlet-class >org.directwebremoting.servlet.DwrServlet </servlet-class >
5151 <init-param >
5252 <param-name >debug</param-name >
5353 <param-value >true</param-value >
You can’t perform that action at this time.
0 commit comments