Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This tutorial assumes you've completed the Coding Struts 2 Actons tutorial and have a working Coding_Actions_Struts2_Ant (or Coding_Actions_Struts2_Mvn) coding_actions project. The example code for this tutorial, Form_Processing_Struts2_Ant or Form_Processing_Struts2_Mvn, is available on Google Code - http://code.google.com/p/struts2-examples/downloads/list. After downloading and unzipping the file, you'll have a folder named Form_Processing_Struts2_Ant (or Form_Processing_Struts2_Mvn). In that folder will be a README.txt file with instructions on now to build and run the example applicationform_processing, is available for checkout from the Struts 2 sandbox subversion repository: https://svn.apache.org/repos/asf/struts/sandbox/trunk/struts2examplesImage Added.

Introduction

In this tutorial we'll explore using Struts 2 to do more involved processing of a form submission. We'll cover how to use a Java model class to store the form input and how to create the Struts 2 form to match up with that model class.

...

If everything is correct, you should be able to create the war file (ant archive or mvn package), deploy the war file to your Servlet container, and open this URL in your web browser: http://localhost:8080/Form_Processing_Struts2_Antform_processing/index.actionImage Modified (Ant version) or http://localhost:8080/Form_Processing_Struts2_Mvn/index.actionImage Removed (Maven version). On that page should be a link to register. Click on that link and you should see the register.jsp page.

...