dwr简介--一个例子(续)

本文介绍了核心业务类TableModelBean.java,包含表格列、排序、分页等属性和方法。还阐述了主要配置文件web.xml、struts-config.xml、dwr.xml和weblogic.xml的配置内容,如web.xml中Servlet的声明,dwr.xml提供远程接口信息等,最后表示后续再写JSP页面相关内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

抱歉这篇才写。上班没有多少时间啊!
TableModelBean.java 这是核心业务类,既要被Action使用又要被dwr使用。
由于我注释写了一些,所以就不详细介绍了
ExpandedBlockStart.gif ContractedBlock.gif public   class  TableModelBean  dot.gif {
InBlock.gif    
InBlock.gif    
//表格的第一列
InBlock.gif
    public static final int COLUMN_1 = 0;
InBlock.gif    
InBlock.gif    
//表格的第二列
InBlock.gif
    public static final int COLUMN_2 = 1;
InBlock.gif    
InBlock.gif    
//表格的第三列
InBlock.gif
    public static final int COLUMN_3 = 2;
InBlock.gif
InBlock.gif    
//每一列的排序升序降序标记 true升序,false降序
ExpandedSubBlockStart.gifContractedSubBlock.gif
    private boolean[] columnFlags = dot.giffalsefalsefalse };
InBlock.gif    
InBlock.gif    
//表格分页总页面数
InBlock.gif
    private int totalPage = 0;
InBlock.gif    
InBlock.gif    
//表格当前页
InBlock.gif
    private int currentPage = 0;
InBlock.gif    
InBlock.gif    
//表格总行数
InBlock.gif
    private int rowsCount = 0;
InBlock.gif
InBlock.gif    
//没用
ExpandedSubBlockStart.gifContractedSubBlock.gif
    private String[] pagers = dot.gif"" };
InBlock.gif
InBlock.gif    
//存放全体记录的容器
InBlock.gif
    private List rows = new ArrayList();
InBlock.gif
InBlock.gif    
//存放当前记录的容器
InBlock.gif
    private List currentPageRows = new ArrayList();
InBlock.gif
InBlock.gif    
//数据库操作类
InBlock.gif
    private static ModelOneDAO dao;
InBlock.gif
InBlock.gif    
//每页记录数设为20
InBlock.gif
    private static final int PAGE_SIZE = 20;
InBlock.gif
InBlock.gif    
//初始排序行为第一行
InBlock.gif
    private int sortedColumn = 1;
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     *  构造函数
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public TableModelBean() dot.gif{
InBlock.gif        dao 
= new ModelOneDAO();
InBlock.gif        init();
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     *  初始化
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
private void init() dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            rows 
= dao.getSortedRows(sortedColumn, columnFlags[sortedColumn]);
InBlock.gif            setRowsCount(rows.size());
InBlock.gif            setTotalPage(getTotalPageByRow(rows.size(), PAGE_SIZE));
InBlock.gif            setCurrentPage(
1);
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            
// TODO Auto-generated catch block
InBlock.gif
            e.printStackTrace();
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 返回当前页的内容
InBlock.gif     * @return Returns the currentPage.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public int getCurrentPage() dot.gif{
InBlock.gif        
return currentPage;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 设置当前页
InBlock.gif     * @param currentPage
InBlock.gif     *            The currentPage to set.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public void setCurrentPage(int currentPage) dot.gif{
InBlock.gif        
this.currentPage = currentPage;
InBlock.gif
InBlock.gif        currentPageRows.clear();
InBlock.gif        
int firstIndex = PAGE_SIZE * (currentPage - 1);
InBlock.gif        
int lastIndex = (firstIndex + PAGE_SIZE) < rowsCount ? firstIndex
InBlock.gif                
+ PAGE_SIZE : rowsCount;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int i = firstIndex; i < lastIndex; i++dot.gif{
InBlock.gif            currentPageRows.add(rows.
get(i));
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取得所有行
InBlock.gif     * @return Returns the rows.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public List getRows() dot.gif{
InBlock.gif        
return rows;
ExpandedSubBlockEnd.gif    }

InBlock.gif
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取的分页数
InBlock.gif     * @return Returns the totalPage.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public int getTotalPage() dot.gif{
InBlock.gif        init();
InBlock.gif        
return totalPage;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 设置分页数
InBlock.gif     * @param totalPage
InBlock.gif     *            The totalPage to set.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public void setTotalPage(int totalPage) dot.gif{
InBlock.gif        
this.totalPage = totalPage;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取得纪录数
InBlock.gif     * @return Returns the totalRows.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public int getRowsCount() dot.gif{
InBlock.gif        
return rowsCount;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     *    设置记录数
InBlock.gif     *  @param totalRows
InBlock.gif     *            The totalRows to set.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public void setRowsCount(int rowsCount) dot.gif{
InBlock.gif        
this.rowsCount = rowsCount;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取得当前页中的记录数
InBlock.gif     * @return Returns the currentPageRows.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public List getCurrentPageRows() dot.gif{
InBlock.gif        
return currentPageRows;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取得page页中的记录,当page大于totalPage时返回最后页
InBlock.gif     * 因为是上面的getCurrentPageRows函数的重载,所以在dwr中不能正常使用。
InBlock.gif     * 于是出现了getRowsByPageNo方法。
InBlock.gif     * @param page
InBlock.gif     * @return the currentPageRows.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public List getCurrentPageRows(int page) dot.gif{
InBlock.gif        currentPageRows.clear();
InBlock.gif        
int firstIndex = PAGE_SIZE * (page - 1);
InBlock.gif        
int lastIndex = (firstIndex + PAGE_SIZE) < rowsCount ? firstIndex
InBlock.gif                
+ PAGE_SIZE : rowsCount;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int i = firstIndex; i < lastIndex; i++dot.gif{
InBlock.gif            currentPageRows.add(rows.
get(i));
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return currentPageRows;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 取得page页中的记录,当page大于totalPage时返回最后页
InBlock.gif     * @param page
InBlock.gif     * @return 包含当前页记录的List
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public List getRowsByPageNo(int page) dot.gif{
InBlock.gif        init();
InBlock.gif        page 
= page > totalPage ? totalPage : page;
InBlock.gif        List result 
= new ArrayList();
InBlock.gif        
int firstIndex = PAGE_SIZE * (page - 1);
InBlock.gif        
int lastIndex = (firstIndex + PAGE_SIZE) < rowsCount ? firstIndex
InBlock.gif                
+ PAGE_SIZE : rowsCount;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int i = firstIndex; i < lastIndex; i++dot.gif{
InBlock.gif            result.add(rows.
get(i));
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return result;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 按照某一列进行排序,再返回当前页中的数据
InBlock.gif     * @param currentPage
InBlock.gif     * @param columnNo
InBlock.gif     * @return the Rows of current Page that sorted by columnNo
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public List getCurrentPageSortedByColumnRows(int currentPage, int columnNo) dot.gif{
InBlock.gif        init();
InBlock.gif        sortBy(columnNo);
InBlock.gif        currentPageRows.clear();
InBlock.gif        
int firstIndex = 20 * (currentPage - 1);
InBlock.gif        
int lastIndex = (firstIndex + 20< rowsCount ? firstIndex + 20
InBlock.gif                : rowsCount;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int i = firstIndex; i < lastIndex; i++dot.gif{
InBlock.gif            currentPageRows.add(rows.
get(i));
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return currentPageRows;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 返回一个分页数组。用处不太大,客户端用Javascript也可以计算。
InBlock.gif     * @return Returns the pages.
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public String[] getPagers() dot.gif{
InBlock.gif        pagers 
= new String[totalPage];
ExpandedSubBlockStart.gifContractedSubBlock.gif        
for (int i = 1; i <= totalPage; i++dot.gif{
InBlock.gif            pagers[i 
- 1= i + "";
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return pagers;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 按照某一列进行排序
InBlock.gif     * @param columnNo
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public void sortBy(int columnNo) dot.gif{
InBlock.gif        
this.sortedColumn = columnNo;
InBlock.gif        columnFlags[columnNo] 
= (!columnFlags[columnNo]);
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            rows 
= dao.getSortedRows(columnNo, columnFlags[columnNo]);
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            
// TODO Auto-generated catch block
InBlock.gif
            e.printStackTrace();
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 删除某一列,按照主键(第一列)
InBlock.gif     * @param key
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public boolean deleteRow(int key) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            dao.deleteRow(key);
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            e.printStackTrace();
InBlock.gif            
return false;
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return true;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 要新增加一个数据前先计算出Id.
InBlock.gif     * 这个例子只是用来演示用的,如果多人访问会出现并发问题
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public int getNextId() dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            
return dao.getNextId();
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            e.printStackTrace();
InBlock.gif            
return -1;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 增加一行
InBlock.gif     * @param trb
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public boolean addRow(TableRowBean trb) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            dao.addRow(trb);
InBlock.gif            
return true;
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            e.printStackTrace();
InBlock.gif            
return false;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 更改一行
InBlock.gif     * @param trb
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public boolean updateRow(TableRowBean trb) dot.gif{
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            dao.updateRow(trb);
InBlock.gif            
return true;
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            e.printStackTrace();
InBlock.gif            
return false;
ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 按照key取回单行信息
InBlock.gif     * @param key
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
public TableRowBean getSingleRow(int key) dot.gif{
InBlock.gif        TableRowBean row;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
try dot.gif{
InBlock.gif            row 
= dao.getSingleRow(key);
ExpandedSubBlockStart.gifContractedSubBlock.gif        }
 catch (SQLException e) dot.gif{
InBlock.gif            row 
= new TableRowBean();
InBlock.gif            e.printStackTrace();
ExpandedSubBlockEnd.gif        }

InBlock.gif        
return row;
ExpandedSubBlockEnd.gif    }

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
/**//**
InBlock.gif     * 辅助方法计算分页数
InBlock.gif     * @param rowSize
InBlock.gif     * @param pageSize
InBlock.gif     * @return
ExpandedSubBlockEnd.gif     
*/

ExpandedSubBlockStart.gifContractedSubBlock.gif    
private static int getTotalPageByRow(int rowSize, int pageSize) dot.gif{
InBlock.gif        
int result = 0;
InBlock.gif        result 
= rowSize % pageSize == 0 ? rowSize / pageSize : rowSize
InBlock.gif                
/ pageSize + 1;
InBlock.gif        
return result;
ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}
接下来就是写配置文件了。主要的配置文件有三个web.xml struts-config.xml dwr.xml
web.xml
None.gif <? xml version="1.0" encoding="ISO-8859-1" ?>
None.gif
<! DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
None.gif                         "http://java.sun.com/dtd/web-app_2_3.dtd"
>
None.gif
< web-app >
None.gif    
< filter >
None.gif        
< filter-name > EncodingFilter </ filter-name >
None.gif        
< filter-class > org.mstar.strutsajax.EncodingFilter </ filter-class >
None.gif        
< init-param >
None.gif                
< param-name > encoding </ param-name >
None.gif                
< param-value > gb2312 </ param-value >
None.gif        
</ init-param >
None.gif    
</ filter >
None.gif    
< servlet >
None.gif        
< servlet-name > action </ servlet-name >
None.gif        
< servlet-class > org.apache.struts.action.ActionServlet </ servlet-class >
None.gif        
< init-param >
None.gif            
< param-name > config </ param-name >
None.gif            
< param-value > /WEB-INF/struts-config.xml </ param-value >
None.gif        
</ init-param >
None.gif        
< load-on-startup > 1 </ load-on-startup >
None.gif    
</ servlet >
None.gif    
< servlet >
None.gif        
< servlet-name > dwr-invoker </ servlet-name >
None.gif        
< display-name > DWR Servlet </ display-name >
None.gif        
< description > Direct Web Remoter Servlet </ description >
None.gif        
< servlet-class > uk.ltd.getahead.dwr.DWRServlet </ servlet-class >
None.gif        
< init-param >
None.gif            
< param-name > config </ param-name >
None.gif            
< param-value > WEB-INF/dwr.xml </ param-value >
None.gif        
</ init-param >
None.gif        
< init-param >
None.gif            
< param-name > debug </ param-name >
None.gif            
< param-value > true </ param-value >
None.gif        
</ init-param >
None.gif        
< load-on-startup > 1 </ load-on-startup >
None.gif    
</ servlet >
None.gif    
< servlet-mapping >
None.gif        
< servlet-name > action </ servlet-name >
None.gif        
< url-pattern > *.do </ url-pattern >
None.gif    
</ servlet-mapping >
None.gif    
< servlet-mapping >
None.gif        
< servlet-name > dwr-invoker </ servlet-name >
None.gif        
< url-pattern > /dwr/* </ url-pattern >
None.gif    
</ servlet-mapping >
None.gif    
< welcome-file-list >
None.gif        
< welcome-file > index.jsp </ welcome-file >
None.gif        
< welcome-file > login.jsp </ welcome-file >
None.gif    
</ welcome-file-list >
None.gif    
< taglib >
None.gif        
< taglib-uri > /WEB-INF/struts-bean </ taglib-uri >
None.gif        
< taglib-location > /WEB-INF/struts-bean.tld </ taglib-location >
None.gif    
</ taglib >
None.gif    
< taglib >
None.gif        
< taglib-uri > /WEB-INF/struts-logic </ taglib-uri >
None.gif        
< taglib-location > /WEB-INF/struts-logic.tld </ taglib-location >
None.gif    
</ taglib >
None.gif    
< taglib >
None.gif        
< taglib-uri > /WEB-INF/struts-html </ taglib-uri >
None.gif        
< taglib-location > /WEB-INF/struts-html.tld </ taglib-location >
None.gif    
</ taglib >
None.gif
</ web-app >
None.gif
其中要注意这段Servlet的声明
None.gif < servlet >
None.gif        
< servlet-name > dwr-invoker </ servlet-name >
None.gif        
< display-name > DWR Servlet </ display-name >
None.gif        
< description > Direct Web Remoter Servlet </ description >
None.gif        
< servlet-class > uk.ltd.getahead.dwr.DWRServlet </ servlet-class >
None.gif        
< init-param >
None.gif            
< param-name > config </ param-name >
None.gif            
< param-value > WEB-INF/dwr.xml </ param-value >
None.gif        
</ init-param >
None.gif        
< init-param >
None.gif            
< param-name > debug </ param-name >
None.gif            
< param-value > true </ param-value >
None.gif        
</ init-param >
None.gif        
< load-on-startup > 1 </ load-on-startup >
None.gif    
</ servlet >
debug打开的话,你就可以看到每一个远程调用。对开发很有用。
struts-config我就不写了,大家对这个比较了解,要看的话,下载我的源码,在最后面我会写上。
重点是dwr.xml.这里是你要提供远程接口信息
<? xml version="1.0" encoding="UTF-8" ?>
<! DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" "http://www.getahead.ltd.uk/dwr/dwr10.dtd" >

< dwr >
    
< init >
        
< converter  id ="tablerowbean"  class ="org.mstar.strutsajax.converter.TableRowConverter" />
      
</ init >
    
< allow >
        
< create  creator ="new"  javascript ="UserLogic" >
            
< param  name ="class"  value ="org.mstar.strutsajax.ajax.UserLogic" />
            
< include  method ="validate" />
        
</ create >
        
< create  creator ="new"  javascript ="TableModel"  scope ="session" >
            
< param  name ="class"  value ="org.mstar.strutsajax.form.TableModelBean" />
            
< include  method ="sortBy" />
            
< include  method ="getRowsCount" />
            
< include  method ="getTotalPage" />
            
< include  method ="setCurrentPage" />
            
< include  method ="getCurrentPageRows" />
            
< include  method ="getCurrentPageSortedByColumnRows" />
            
< include  method ="getRowsByPageNo" />
            
< include  method ="deleteRow" />
            
< include  method ="getNextId" />
            
< include  method ="addRow" />
            
< include  method ="updateRow" />
            
< include  method ="getSingleRow" />
        
</ create >
         < convert  converter ="tablerowbean"  match ="org.mstar.strutsajax.form.TableRowBean" />
    
</ allow >
</ dwr >
详细配置你可以看dwr的文档。
这里要说的就是,convert,对于你自己的类型如 TableRowBean 必须写一个Converter来转化它,我的 TableRowConverter 其实就是继承与BeanConverter然后什么事情也没做。但是我如果自己用BeanConverter就不行,不知道为什么。其他的都比较好理解。
当然我还有一个weblogic.xml,因为我是发布在weblogic上的。
None.gif <? xml version="1.0" encoding="UTF-8" ?>
None.gif
<! DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN"    "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd" >
None.gif
< weblogic-web-app >
None.gif    
< jsp-descriptor >
None.gif        
< jsp-param >
None.gif            
< param-name > debug </ param-name >
None.gif            
< param-value > true </ param-value >
None.gif        
</ jsp-param >
None.gif    
</ jsp-descriptor >
None.gif    
< context-root > struts-ajax </ context-root >
None.gif
</ weblogic-web-app >
剩下了就是JSP页面了。我再写一篇吧。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值