1、在浏览器输入
http://192.168.28.183:8088/dmscs/hello.action
得到
HTTP Status 404 - There is no Action mapped for namespace / and action name hello.
极度悲剧死;
2、web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
3、struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.action.extension" value="action,do,webwork" />
<package name="default" namespace="/" extends = "struts-default">
<action
name = "hello"
class="com.dms.base.strust.VerySimpleAction"
method="hello" >
<result name="success">/bLogin.jsp</result>
</action>
</package>
</struts>
4、VerySimpleAction
package com.dms.base.strust;
public class VerySimpleAction {
public String hello(){
return "success";
}
}
5、页面
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
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 'bLogin.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
来了
</body>
</html>
相关推荐
在Web开发中,尤其是使用基于Java的Web框架如Struts时,开发者可能会遇到一个常见的问题:“HTTP Status 404 - There is no Action mapped for namespace and action name BackMemberGroupAudit”。这个问题通常出现...
前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, ...
在网上找了好个struts2的例子结果都不好使报There is no Action mapped for namespace / and action name这个错,没办法自己搞了个好用的,myeclipse 6.0 +tomcat5.5 + jdk 1.5 引入项目后直接发布就可以了!
"There is no Action mapped for namespace and action name错误的解决方法.txt"文档可能详细解释了这个问题的成因,如配置错误、Action类未正确指定、或者struts.properties或struts.xml配置文件中的条目缺失。...
Understanding these differences and similarities is essential for managing users and files effectively across different Unix systems. Administrators should refer to specific documentation or manuals ...
HTTPStatus 404 - There is no Action mapped for namespace [/] and action name [user_login] ``` 这通常意味着在`struts.xml`中未为指定的动作名和命名空间配置对应的Action处理类。解决这一问题的关键在于确保...
- In this approach, I/O devices and memory share the same address space, meaning that no special commands are needed for I/O operations. Instead, I/O operations resemble memory reads and writes. - ...
标题中的"Read-and-write-memory-mapped-file.rar_SLE4442_memory_映射内存 读写"提到了两个主要概念:SLE4442芯片和内存映射文件的读写操作。SLE4442是一种智能卡芯片,常用于存储安全数据,如加密密钥。在WinCE...
本文将针对其中一种常见的错误提示:“There is no Action mapped for namespace / and action name”进行深入分析,并给出相应的解决方法。 #### 二、问题描述 当在使用 Struts 框架开发 Web 应用时,如果配置...
Stops the action invocation immediately (by throwing a PauseException) and causes the action invocation to return the specified result, such as Action.SUCCESS, Action.INPUT, etc. void ...
利用业余时间,写了个貌似windows自带的任务管理器(私下认为其功能更甚windows自带的)。 封装了许多API接口成为类(一些源自网络,一些自己封装),方便C++使用。但是对整个代码的设计比较烂,打算在学完设计模式...
错误信息通常为:“There is no Action mapped for namespace / and action name.”,这意味着Struts2在尝试处理请求时找不到对应的Action映射。此外,如果设置了默认的欢迎页面(welcome file),但在启动应用后...
原创GSM基带信号的中频调制-qam_symbol_mapped.m 这是GSM基带信号的处理程序,包括符号映射、插值、调制等过程
Zynq是Xilinx公司推出的集成了ARM处理器和FPGA功能的SoC平台,它支持片上系统(SoC)解决方案,将处理器和可编程逻辑紧密结合,使设计师能够在单个芯片上实现高性能的处理和灵活的可编程逻辑功能。...
<location>/error/404.jsp</location> </error-page> ``` #### 15. `taglib`元素 `taglib`元素用于声明自定义标签库的位置。DTD定义如下: ```xml <!ELEMENT taglib (taglib-uri, taglib-location)> <!ELEMENT ...
在处理大量数据时,内存管理是一项关键任务,而NumPy中的Memory-mapped Files(内存映射文件)机制就是一个高效的数据处理工具。本文将深入探讨Memory-mapped Files在NumPy中的使用和其背后的原理。 Memory-mapped ...
[[03 08:58:22,466 INFO ] org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:511) - Refreshing WebApplicationContext for namespace 'hessian-...
As these devices typically operate at slower speeds compared to the CPU and RAM, there is a need for I/O interfaces. An I/O device interface acts as a mediator, facilitating data transfer and ...
Absolute path to 'lspci' is '/sbin/lspci', so running it may require superuser privileges (eg. root). spring@linux-njgq:~> cat /proc/meminfo MemTotal: 2054648 kB MemFree: 1305828 kB Buffers: 21804 kB ...