struts - wannik.files.wordpress.com filecrud. show all employees. delete. update. update or create....

26
Struts May 9, 2014

Upload: hathu

Post on 30-May-2019

213 views

Category:

Documents


0 download

TRANSCRIPT

Struts

May 9, 2014

Why

• request.getParameter(…)

• Integer.parseInt(request.getParameter(…))

• product.setPrice(Integer.parseInt(req…()))

• etc.

Hello Struts

WEB-INF/web.xml

index.jsp

• JSP to Struts is like ASM to C

WEB-INF/content/hello-world.jsp

or

Bean

index.jsp <form action="hello-world">

<input type="text" name="user.name" />

<input type="text" name="user.salary" />

<input type="submit" />

</form>

hello-world.jsp

CRUD

Show All Employees

Delete

Update

Update or Create

New