赞助连接

赞助连接

阅 读 文 章

如何成功调试《Struts在行动》的第一例

[来源:网上转载 (http://www.chinaunix.net) | 作者:网友(不详) | 时间:2007-07-07 | 浏览:人次 ]

1、按书中要求先建立ActionForm.java、RegisterAction.java、struts-config.xml和三个页面并依照书中介绍部署在Tomcat下

2、我使用的环境是jb,按照书中介绍部署好的应用在编译时会遇到如下问题:
a、找不到UserDirectory类
b、找不到struts-html.tld文件

3、解决方法
a、新建UserDirectory和UserDirectory类,可以在某位网友的blog上找到
http://blog.matrix.org.cn/page/xy_cq01/?anchor=userdirectory_%E4%B8%8E_userdirectoryexception

代码如下:
/*
* $Header: /home/cvspublic/jakarta-struts/src/example/org/apache/struts/example/LogoffAction.java,v 1.4 2000/09/23 22:53:53 craigmcc Exp $
* $Revision: 1.4 $
* $Date: 2000/09/23 22:53:53 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
*   notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
*   notice, this list of conditions and the following disclaimer in
*   the documentation and/or other materials provided with the
*   distribution.
*
* 3. The end-user documentation included with the redistribution, if
*   any, must include the following acknowlegement:
*     "This product includes software developed by the
*     Apache Software Foundation (http://www.apache-DOT-org/)."
*   Alternately, this acknowlegement may appear in the software itself,
*   if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
*   Foundation" must not be used to endorse or promote products derived
*   from this software without prior written permission. For written
*   permission, please contact apache-AT-apache.org.
*
* 5. Products derived from this software may not be called "Apache"
*   nor may "Apache" appear in their names without prior written
*   permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
TAG标签 : 行动 第一 调试 成功 如何 the Apache OR OF null userId

最新评论 共有0位网友发表了评论

发表评论

评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名:(注册)
密码:
验证码:
匿名发表
网站地图友情连接交流论坛网站投稿广告服务联系我们留言本站长统计
Some rights reserved: www.chmhome.com, 鄂ICP备07010232号 E-mail:chinakafei@live.com,QQ:552766
中国咖啡技术网(Chmhome):国外编程技术书籍,中文编程手册,经典编程文章,交流技术,技术软件下载,计算机论文,毕业论文.