Struts2 Login application a complete example
Join the DZone community and get the full member experience.
Join For FreeYou have to be a member first of www.dzone.com to download the zip file.
Struts2 Login application a complete example :
Uses the following (developed using eclipse-mars http://www.eclipse.org/downloads and apache tomcat server v8.0 http://tomcat.apache.org) :
1.) Session support (via HTTPSession / ServletActionContext) by http://struts.apache.org
2.) Convention Annotations and webwork/xwork2 Validator annotations.
3.) MyBatis Data Mapper https://code.google.com/p/mybatis and http://loianegroner.com including database connectors/configuration for MySQL(via mysql-connector-java-xx.jar), MSSQL(via jdts.xx.jar) and MS Access(ucanaccess-xx.jar) plugins.
4.) Bootstrap support and jquery validation plugins using struts2-jquery-plugin-x.x.x.jar plugins by http://struts.jgeppert.com.
5.) Security.MessageDigest using simple MD5 password encryption.
To test the application just the follow these instructions :
(1) download and extract struts2-login.zip.
(2) download all necessary library/plugins as shown in the include library.jpg (included in the zip)
(3) create the blogDb database
(4) run mssqlstruts2,sql (included in the zip) in your db query tool
(5) run the application use this (username: root password : ranilo)
Enjoy and have fun.... If you like it please buy me some coffee.. star bucks please.. no three in one sachet just a joke...If you have questions you can reach me through my email ranielvira@gmail.com
package ph.web.action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import com.opensymphony.xwork2.ActionSupport;
@ParentPackage(value = "showcase")
@Result(name="success", type="redirect", location="user-login.action")
public class Index extends ActionSupport {
private static final long serialVersionUID = 1L;
public String Execute() {
return SUCCESS;
}
}
application
Opinions expressed by DZone contributors are their own.
Comments