2 baidu 29643173 baidu_29643173 于 2015.07.21 17:11 提问

jsp增删改查怎么写?怎么与actiong,dao结合?ssh框架 求大神指导!跪求~
<%@page contentType="text/html;  charset=UTF-8" import="java.util.*" %>
<%@  taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <jsp:include page='/res/inc/inc.jsp' flush='true'/>
</head>
<body>
<s:form action="Add" id="form1" theme="simple" >
    <div class="buttonDiv">
        <s:submit theme="simple" name="Add" value="添加" cssClass="button_style" />
    </div>
    <div class="validatemsg">
        <s:actionerror/>
        <s:fielderror/>
        <s:actionmessage/>
    </div>
<div class=neibiao_top>发文 </div>
<TABLE class="TableStyle" >
    <TR>
       <TH width="5%"> 序号</TH>
       <TH>主题</TH>
       <TH>分类ID</TH>
       <TH width="6%">编辑</TH>
    </TR>
<s:iterator value="faWenList" status="st" var="cil">
    <TR>
       <TD class="tdStyle" align="center"><s:property value='#st.index+1'/></TD>
       <TD class="tdStyle"><s:property value="zhuTi"/></TD>
       <TD class="tdStyle"><s:property value="fenLeiID"/></TD>
       <TD class="tdStyle" align="center"><a  href='<s:url action="Edit"><s:param name="id" value="id"></s:param></s:url>'>编辑</a></TD>
    </TR>
</s:iterator>
</TABLE>
</s:form>
</body>
</html> 

4个回答

danielinbiti
danielinbiti   Ds   Rxr 2015.07.21 17:12
yuke198907
yuke198907   2015.07.21 17:31

难道没有学习过SSH?如果了解过应该大概思路了解一点吧

strutce
strutce   Ds   Rxr 2015.07.21 18:00
caozhy
caozhy   Ds   Rxr 2015.07.21 19:35

http://blog.csdn.net/w_basketboy24/article/details/8642846
搞清楚,action不要直接操作数据库

Csdn user default icon
上传中...
上传图片
插入图片