Sturts 2

Páginas: 47 (11671 palabras) Publicado: 15 de marzo de 2012
Struts in Action

Struts in Action
Building web applications with the leading Java framework
Ted Husted
Cedric Dumoulin George Franciscus David Winterfeldt

MANNING
Greenwich (74° w. long.)

For online information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, pleasecontact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Greenwich, CT 06830

Fax: (203) 661-9018 email: orders@manning.com

©2003 by Manning Publications Co. All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior writtenpermission of the publisher.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.

Recognizing the importance of preserving what has been written, it is Manning’spolicy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end.

The following figures were adapted from other Manning books: figure 2.1 from Swing by Matthew Robinson and Pavel Vorobiev (figure 1.3); figures 2.8, 10.6, 11.1, and 11.2 from Web Development with JavaServer Pages Second Edition by Duane Fields and Mark Kolb (figures 10.1, 10.5, 6.2, and10.4). Figure 2.9 by Jean-Michel Garnier is reproduced with permission from the Apache Software Foundation.

Manning Publications Co. 32 Lafayette Place Greenwich, CT 06830

Copyeditor: Liz Welch Typesetter: Tony Roberts Cover designer: Leslie Haimes

ISBN 1-930110-50-2 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – VHG – 05 04 03 02

brief contents
PART 1 GETTING STARTED WITHSTRUTS ........................ 1
1 2 3 4
I

Introduction

3 29 105 59

I

Exploring the Struts architecture Building a simple application Configuring Struts components

I

I

PART 2 RAISING YOUR FRAMEWORK ............................. 145
5 6 7 8 9
I

Coping with ActionForms

147 183 193 207

I

Wiring with ActionForwards Working with Action objects ExtendingActionServlet

I

Designing with ActionMappings 255

I

I

PART 3 BUILDING YOUR PAGES .................................... 265
10
I

Displaying dynamic content

267

v

vi

BRIEF CONTENTS

11 12 13 14

I

Developing applications with Tiles Validating user input 365 Localizing content 409 Using data services with Struts 437

319

I

I

I

PART 4 STRUTS BY EXAMPLE......................................... 473
15 16 17
I

Artimus: pulling out the stops Velocity: replacing JSPs 555

475

I

Redux: migrating to Struts 1.1 533

I

contents
foreword xix preface xxiii acknowledgments xxvi about this book xxviii

PART 1 GETTING STARTED WITH STRUTS ..................... 1

1

Introduction 3
1.1 What is this book about? 4
Who makes the Strutssoftware? 4 Why is it called Struts? 5
I

Why is Struts open source?

5

1.2 1.3

What are application frameworks? 5
Other types of frameworks 6
I

Enabling technologies 6
Hypertext Transfer Protocol (HTTP) 7 Common Gateway Interface (CGI) 8 Java servlets 9 JavaServer Pages 10 JSP tags 11 JavaBeans 12 Model 2 14
I I I I

1.4

Struts from 30,000 feet 14
Building a simple application16 Jump-starting development 16 Where the rubber meets the road 18 Looking back 24
I I

1.5

Summary

28

vii

viii

CONTENTS

2

Exploring the Struts architecture 29
2.1 2.2 Talking the talk 30
I

Why we need Struts 30
One step back, three steps forward 30 Enter Struts Struts controller components 31 Developing a web application with Struts 36
I

31

2.3

Why we...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • 2 2
  • 2 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS