Skip to content

{ Monthly Archives } July 2008

Issue with Eclipse WTP not copying over .xml/.properties for maven project

I’ve recently hit an issue where Eclipse doesn’t publish my properties or xml files from src/main/resources/ to my Tomcat deployment. This seems to force it along by populating the target directory.
mvn clean compile resources:resources war:exploded

Tagged , ,

Calling different methods via submit buttons using Spring MVC

Using Spring 2.5 annotation, you can specify different buttons like so:
<input type="submit" name="save" value="Save" />
<input type="submit" name="saveAndContinue" value="Save and Continue" />
In your controller, you can handle this like so
@RequestMapping(params = "saveAndContinue", method = RequestMethod.POST)
public String saveAndContinue() {
save(request);
return "redirect:/newPage.html";
}

@RequestMapping(params = "save", method = RequestMethod.POST)
public String save() {
[...]

Tagged , ,