Struts 2 Getting-Started on Ubuntu 14.04 Trusty LTS Linux Easy Guide

June 15th, 2014 by thelinuxevangelist

Struts 2 Quick-Start on Ubuntu Linux




Hello Ubuntu User! This Tutorial Shows You Step-by-Step How-to Install and Getting-Started with Struts 2 Hello-World Java Web Application on Ubuntu 14.04 Trusty Tahr LTS 32/64bit GNU/Linux.

The first benefit of using Struts is that you don’t have to write a Controller and can concentrate on writing Business Logic in action classes.

Struts 2 Features List:

  • Struts provides a Filter Dispatcher, saving you writing one.
  • Struts employs an XML-based Configuration file to match URIs with actions.
  • Struts instantiates the Action Class and populates Action Properties with user inputs. If you don’t specify an action class, a default action class will be instantiated.
  • Struts Validates user input and redirects user back to the input form if validation failed. Input validation is optional and can be done programmatically or declaratively. On top of that, Struts provides Built-in Validators for most of the tasks you may encounter when building a web application.
  • Struts invokes the Action Method and you can change the method for an action through the Configuration File.
  • Struts examines the Action Result and executes the result. The most common result type, Dispatcher, forwards control to a JSP. However, Struts comes with various result types that allow you to do things differently, such as generate a PDF, redirect to an external resource, send an error message, etc.
Struts 2 Quick-Start on Ubuntu 14.04 Trusty LTS Linux - Featured
  1. Open a Command Line Terminal Window
    Ctrl+Alt+t on desktop
    (Press “Enter” to Execute Commands)

    Struts 2 Quick-Start on Ubuntu 14.04 Trusty LTS Linux - Open Terminal
  2. Download All Apache Struts 2 Release

    Get Struts2 All .zip
  3. Double-Click on Archive and Extract into Home

     - Extract Apache Struts 2
    Or from Command Line:

    unzip -d $HOME/struts2 struts-2*-all.zip
  4. Relocate Struts 2

    mv $HOME/struts2* $HOME/struts2
  5. Access Target Directory

    cd $HOME/struts2
  6. Struts 2 Hello-World Quick-Start Example

    Find Struts 2 Hello-World
(Visited 1,011 times, 1 visits today)
Share on Tumblr

Tags: , , , , , , , , , , , , ,


Comments are disabled