spring - Change default homepage for Roo generated app using SpringMVC -


by default when web app starts starts home page generated roo view name "index"

suppose add new custom controller using following command,

web mvc controller ~.web.viewhomecontroller --preferredmapping /homepage1 

it generates following code,

@requestmapping("/homepage1/**") @controller  public class viewhomecontroller {    @requestmapping    public void get(modelmap modelmap, httpservletrequest request,                                    httpservletresponse response) {    }     @requestmapping(method = requestmethod.post, value = "{id}")    public void post(@pathvariable long id, modelmap modelmap,                   httpservletrequest request, httpservletresponse response) {    }     @requestmapping    public string index() {      return "home/homepage1";    } } 

i want "home/homepage1" page default page shown when roo application starts.

can please guidance/details on changes need make enable "home/homepage1" default homepage application.

thanks in advance. using latest version of spring roo, 1.1.4.

thanks

in webmvc-config.xml, replace following section:

<!-- selects static view rendering without need explicit controller --> <mvc:view-controller path="/" view-name="index" /> 

with view name prefer.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -