Quick tip: how to add syntax highlighting to any projectpublic string showallarticleforpage () throws exception {httpservletrequest request = servletactioncontext. getrequest (); string username = (string) actioncontext. getcontext (). getsession (). get ("user"); system. out. println ("showallarticleforpage === page to jump to after posting and modifying the article = username =" + username); string pageindexs = request. getparameter ("pageindex"); integer pagein DEX = 1; Boolean pcormobile = httprequestdeviceutils. ismobiledevice (request); system. out. println ("pcormobile =" + httprequestdeviceutils. ismobiledevice (request); If (pcormobile) {return "mobile" ;}if (! "". Equals (pageindexs) & pageindexs! = NULL) {pageindex = integer. parseint (request. getparameter ("pageindex"); Request. setattribute ("pageindex", pageindex);} // request. setattribute ("pager", articleservice. showallarticleforpagebyusername (username, pageindex); // request. setattribute ("pager", articleservice. showallarticleforpage (pageindex); Request. setattribute ("type", "sign"); Return "articleslist ";}
Quick tip: how to add syntax highlighting to any project