Running and Testing Struts 2 Login application

Running Struts 2 Login Example In this section we will run the example on Tomcat 6.0 server and check how it works.

Ads

Tutorials   
Login form in Struts2 version 2.3.16 Struts 2 Login Application Struts 2 Hello World Annotation Example Struts 2 Tutorial: Easy steps to learn Struts 2 Struts2 Application in Eclipse: Running the application in Eclipse IDE Struts 2 Hello World Application using Eclipse Interceptors in Struts 2 Struts 2 Action Tag Struts 2 in Agile Development Environment Struts 2 UI Tags Generic Tags Creating own Interceptor What are Interceptors in Struts 2 and how do they work? Results Value Stack / OGNL Action in Struts 2 Framework Struts 2 Interceptors Struts 2.3.15.1 Maven - How to use Maven dependency of Struts 2.3.15.1? Download Struts 2.3.15.1 How Struts 2 Framework works? Architecture of Struts 2 Framework Features and Enhancements in Struts 2.3.15.1 Struts 2 Tutorials - Struts version 2.3.15.1 Struts Flow Diagram Step By Step Struts Tutorial Struts 2 Login Form Example Struts 2 Hello World Example Introduction to Struts 2 Framework Downloading and Installing Struts 2.3.8 Struts 2.3.8 released with new features Struts 2.3.8 Tutorials and Examples Subset Tag Actionerror Tag Struts 2 Autocompleter,Struts 2 Autocomplete Generator Tag Struts 2 Application Struts 2 zero configuration,Struts 2 zero configuration Example Static Parameter, Static Parameter in Struts 2, Struts 2 Static Parameter Pagination Example Struts 2.2.1 Title Struts2 ElseIf Tag Example Struts2 Else Tag Example Struts2 If,Else,ElseIf Tag Example Struts2 tag refrences and Example How to download, compile and test the tutorials using ant. Struts 2.1.8 Login Form Struts 2.1.8 Hello World Example Download Struts 2.1.8, Downloading and installing Struts 2.1.8 Showcase application
Ads

Running and Testing Struts 2 Login application

     

Running Struts 2 Login Example
In this section we will run the example on Tomcat 6.0 server and check how it works.

Running Tomcat

To run the Tomcat, go to its bin directory and then double click on startup.bat. The startup.bat will start the tomcat.

Testing application

To test the application type http://localhost:8080/struts2tutorial/. Your browser should show the following screen:

 

Now click on "Login Application" link. Then your browser will display the Login page as shown below:

 

Now click on the "Login" button. Application will show the following error screen:

Now you enter the Login name "Admin" and click on the "Login" button, application will show the following error:

 

Now enter any password except "Admin", application will again show the error. This error is actually generated in the Action class.

 

Now enter the valid password "Admin" and click on "Login" button. Now the application will show you the welcome message as shown below.

 

Congratulation! Now you have successfully developed and tested your Struts 2 Login application. In the next section we will show you how to add client side Java Script validation using Struts 2 Validation framework.

 

     

Advertisements

Share on Google+Share on Google+

Running and Testing Struts 2 Login application

Posted on: March 14, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Running and Testing Struts 2 Login application   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:2
pooja
January 10, 2012
css

how to apply or use css in struts2 and how to configure in whole project via single css theme or file?
sadakar pochampalli
November 21, 2012
Good Example

Good one... very useful for beginners :-)

Ads

 

Ads