0% found this document useful (0 votes)
26 views1 page

Hibernate&struts2 - Adicionar Produtos

This JSP page allows users to add new product information to a database. It contains a form with text fields for a product's name, price, stock level, and owner ID that submits to a product management action called addProduct using the POST method. There are also page header and title elements.

Uploaded by

Fabiano Farah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Hibernate&struts2 - Adicionar Produtos

This JSP page allows users to add new product information to a database. It contains a form with text fields for a product's name, price, stock level, and owner ID that submits to a product management action called addProduct using the POST method. There are also page header and title elements.

Uploaded by

Fabiano Farah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

addProduct.

jsp

<?xml version="1.0" encoding="ISO-8859-1" ?>


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Adicionar Produtos</title>
</head>
<body>

<h1>Cadastro de produtos</h1>

<s:form namespace="/product" action="addProduct" method="post">


<s:textfield label="name" name="product.name" />
<s:textfield label="prince" name="product.prince" />
<s:textfield label="stock" name="product.stock" />
<s:textfield label="owner" name="product.owner.id" />
<s:submit value="OK" />
</s:form>

</body>
</html>

Page 1

You might also like