这个action 对应的ResetAction.java文件应该怎么写? <action name="reset"
parameter="do"
path="/reset"
scope="request"
type="com.nbw.ResetAction">
<forward
name="reset"
path="/admin/reset.jsp"
contextRelative="true" /> </action>下面这个编译有错在哪里了????????????
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.actions.DispatchAction;public class ResetAction extends DispatchAction
{ public ResetAction()
{
}
public ActionForward getResetIn(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
return mapping.findForward("reset");
}}
错误提示:C:\Tomcat 5.0\webapps\new\WEB-INF\classes\com\nbw>javac ResetAction.java
ResetAction.java:4: 软件包 org.apache.struts.action 不存在
import org.apache.struts.action.*;
^
ResetAction.java:5: 软件包 org.apache.struts.actions 不存在
import org.apache.struts.actions.DispatchAction;
^
ResetAction.java:7: 找不到符号
符号: 类 DispatchAction
public class ResetAction extends DispatchAction
^
ResetAction.java:15: 找不到符号
符号: 类 ActionMapping
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:15: 找不到符号
符号: 类 ActionForm
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:15: 找不到符号
符号: 类 ActionForward
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
6 错误
parameter="do"
path="/reset"
scope="request"
type="com.nbw.ResetAction">
<forward
name="reset"
path="/admin/reset.jsp"
contextRelative="true" /> </action>下面这个编译有错在哪里了????????????
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.apache.struts.actions.DispatchAction;public class ResetAction extends DispatchAction
{ public ResetAction()
{
}
public ActionForward getResetIn(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
{
return mapping.findForward("reset");
}}
错误提示:C:\Tomcat 5.0\webapps\new\WEB-INF\classes\com\nbw>javac ResetAction.java
ResetAction.java:4: 软件包 org.apache.struts.action 不存在
import org.apache.struts.action.*;
^
ResetAction.java:5: 软件包 org.apache.struts.actions 不存在
import org.apache.struts.actions.DispatchAction;
^
ResetAction.java:7: 找不到符号
符号: 类 DispatchAction
public class ResetAction extends DispatchAction
^
ResetAction.java:15: 找不到符号
符号: 类 ActionMapping
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:15: 找不到符号
符号: 类 ActionForm
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:15: 找不到符号
符号: 类 ActionForward
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form
HttpServletRequest request, HttpServletResponse response)
^
6 错误
解决方案 »
- servlet打印页面的所有超级链接
- hibernate 有没有重写equals和hashcode?
- 如何让表格水平居中的同时还能控制表格在垂直上的位置?
- Flex 中 DataGrid 可编辑时,编辑完后怎么取得编辑后的新值,我要更新数据库
- jsp页面的问题?
- JSP 读取内容页,怎么去掉样式啊?
- 请教:在linux下做个调用c写的.so动态链接库例子要装哪些东西?
- 急100分求救
- 高手帮我看看代码 问题是注册表单中空字符也能注册
- 为什么ssh框架做的登录页面只能登录5次?
- 做一个DIV层,点“+”展开,“-”关闭,怎么处理?
- Servlet action is not available 附件为1.5M程序包
楼主【hongguang5885】截止到2008-06-23 19:32:08的历史汇总数据(不包括此帖):
发帖数:0 发帖分:0
结贴数:0 结贴分:0
未结数:0 未结分:0
结贴率:-------------------结分率:-------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
.;C:\Program Files\Java\jdk1.5.0_08\lib\tools.jar;C:\Program Files\Java\jdk1.5.0_08\lib\dt.jar;C:\Tomcat 5.0\common\lib\servlet-api.jarstruts需要的包文件导入,是否正常??????
望指教!!!!
放到了C:\Tomcat 5.0\webapps\new\WEB-INF\lib
可是这次报了7个错C:\Tomcat 5.0\webapps\new\WEB-INF\classes\com\nbw>javac ResetAction.java
ResetAction.java:4: 软件包 org.apache.struts.action 不存在
import org.apache.struts.action.*;
^
ResetAction.java:5: 软件包 org.apache.struts.actions 不存在
import org.apache.struts.actions.DispatchAction;
^
ResetAction.java:6: 软件包 org.apache.struts.actions 不存在
import org.apache.struts.actions.MappingDispatchAction;
^
ResetAction.java:8: 找不到符号
符号: 类 MappingDispatchAction
public class ResetAction extends MappingDispatchAction
^
ResetAction.java:16: 找不到符号
符号: 类 ActionMapping
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:16: 找不到符号
符号: 类 ActionForm
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
^
ResetAction.java:16: 找不到符号
符号: 类 ActionForward
位置: 类 com.nbw.ResetAction
public ActionForward getResetIn(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
^
7 错误C:\Tomcat 5.0\webapps\new\WEB-INF\classes\com\nbw>
推荐使用MyEclipse自动导入
谁记得那么多包名