DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone >

Struts2 Login application a complete example

Ranilo Elvira user avatar by
Ranilo Elvira
·
Nov. 29, 14 · · Code Snippet
Like (1)
Save
Tweet
5.62K Views

Join the DZone community and get the full member experience.

Join For Free
You 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.

Popular on DZone

  • Memory Debugging and Watch Annotations
  • 11 Reasons To Use Selenium for Automation Testing
  • Maven Tutorial: Nice and Easy [Video]
  • The Right Way to Hybridize Your Product Development Technique

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo