Struts2为什么无法找到action啊?eclipse和myeclipse不一样吗?
来源:互联网 发布:域名注册使用godaddy 编辑:程序博客网 时间:2024/06/06 14:10
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> </head> <body> This is my JSP page. <br> <a href="ac">跳转action</a> </body></html>
这是再简单不过的jsp页面了,我点击“跳转action”就提示404啊。
下面是配置和代码
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN""http://struts.apache.org/dtds/struts-2.1.7.dtd"><struts> <constant name="struts.configuration.xml.reload" value="true"></constant> <package name="system" extends="strust-default" namespace="/"> <action name="ac" class="cn.itcast.elec.web.action.ElecTextAction" method="ac"> </action> </package></struts>
package cn.itcast.elec.web.action;import com.opensymphony.xwork2.ActionSupport;import com.opensymphony.xwork2.ModelDriven;import cn.itcast.elec.web.form.ElecTextForm;public class ElecTextAction extends ActionSupport implements ModelDriven<ElecTextForm>{private ElecTextForm elecTextForm=new ElecTextForm();@Overridepublic ElecTextForm getModel() {// TODO Auto-generated method stubreturn elecTextForm;}public String ac(){System.out.println("ElecTextAction中ac方法执行了");return NONE;}}
0 0
- Struts2为什么无法找到action啊?eclipse和myeclipse不一样吗?
- Spring+struts2.3无法找到action
- eclipse出现无法找到action或namespace的解决办法
- MyEclipse无法找到BASE64Encoder
- Struts2 进入首页如何调用和找到action
- myeclipse无法找到JPEGImageEncoder问题
- myeclipse无法找到JPEGImageEncoder问题
- myeclipse无法找到JPEGImageEncoder问题
- Struts2可以找到action找不到jsp问题
- 为什么eclipse的debug的代码和程序的代码不一样
- 整合Struts2和spring3的时候,sturts2配置文件没问题,能找到action,但页面空白
- eclipse 无法找到主类
- Struts2 .action和.do
- 男生和女生为什么会不一样呢?------
- 为什么实际大小和占用空间不一样
- 文件大小为什么和占用空间不一样?
- 文件大小为什么和占用空间不一样?
- vmware虚拟机为什么和主机网段不一样
- boosting和adaboost区别
- jQuery笔记--动画篇
- 设计模式六大原则 - (4):接口隔离原则
- Android二維碼掃描
- spring mvc 通过bean获取form的参数和并且进行服务器验证 ,而且支持多个文件上传的用法。html使用form_data
- Struts2为什么无法找到action啊?eclipse和myeclipse不一样吗?
- zabbix trigger表达式
- 对数组的键名进行排序
- Android Listview 性能优化
- Fuel 9.0安装的Openstack Controller节点进程整理
- C++字符串格式化
- 第六天 一个小程序和数组介绍
- s函数的控制流
- 北润乾南帆软