<%@ page contentType="text/html; charset=UTF-8" pageEncoding="Big5"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>addBook1.jsp</title>
<s:head theme="xhtml" /><!-- 預設 -->
<sx:head debug="false" cache="false" parseContent="false" compressed="false" extraLocales="zh-tw,en-us,ja,ko" />
</head>
<body>
<h2>
新增書籍
</h2>
<s:form action="bookAction1" namespace="/Book" >
<s:textfield name="name" label="書籍名稱" value="哈利波特的神秘魔法石"/>
<s:submit value="送出" method="addBook"/>
</s:form>
<h2>
新增書籍
</h2>
<s:form action="bookAction1!addBook" namespace="/Book" >
<s:textfield name="name" label="書籍名稱" value="哈利波特的神秘魔法石"/>
<s:submit value="送出" />
</s:form>
<h2>
新增書籍
</h2>
<form action="<%=request.getContextPath()%>/Book/bookAction1!addBook.action" method="post">
//傳統表單以方法呼叫為優先,然後才是xml,但寫在xml中好維護。都沒有寫時執行excute
書籍名稱:<input type="text" name="name" value="哈利波特的神秘魔法石"/><br>
<input type="submit" value="送出" />
</form>
</body>
</html>