struts 2 - the modern web application framework by nalin de zoysa

12
Struts 2 - The modern web application framework By Nalin De Zoysa http://nalin-blogging.blogspot.com/

Upload: mariah-webster

Post on 14-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Struts 2 - The modern web application framework By Nalin De Zoysa

Struts 2 - The modern web application frameworkBy Nalin De Zoysa

http://nalin-blogging.blogspot.com/

Page 2: Struts 2 - The modern web application framework By Nalin De Zoysa

Setup the Environment

Download the struts2 Create web project in eclipse Add the strtus libs to the project Create the struts.xml in src Create loginAction.java Create view(.jsp) Configure the web.xml

Page 3: Struts 2 - The modern web application framework By Nalin De Zoysa
Page 4: Struts 2 - The modern web application framework By Nalin De Zoysa

Introduce Maven

• What is maven– Apache Maven is a build tool to support the developer at the whole process of a

software project.

– Based on the concept of XML Project Object Model (POM).

– Originally developed for building Turbine.

– A small core with numerous plugins

Page 5: Struts 2 - The modern web application framework By Nalin De Zoysa
Page 6: Struts 2 - The modern web application framework By Nalin De Zoysa

Use the business service..

Create service class and call it in action In jsp use the struts tags

Page 7: Struts 2 - The modern web application framework By Nalin De Zoysa

Access member variables

Page 8: Struts 2 - The modern web application framework By Nalin De Zoysa

Cont..

Page 9: Struts 2 - The modern web application framework By Nalin De Zoysa

Value Stack

Page 10: Struts 2 - The modern web application framework By Nalin De Zoysa

Demonstration...

Lets use maven demo

Page 11: Struts 2 - The modern web application framework By Nalin De Zoysa

How to pass the parameters

Send as get Send as post whildcards

Page 12: Struts 2 - The modern web application framework By Nalin De Zoysa

www.hSenidbiz.comwww.hSenidbiz.com