- 浏览: 1536189 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (525)
- SEO (16)
- JAVA-EE-Hibernate (6)
- JAVA-EE-Struts (29)
- JAVA-EE-Spring (15)
- Linux (37)
- JAVA-SE (29)
- NetWork (1)
- CMS (14)
- Semantic Research (3)
- RIA-Flex (0)
- Ajax-Extjs (4)
- Ajax-Jquery (1)
- www.godaddy.com (0)
- SSH (34)
- JavaScript (6)
- SoftwareEngineer (9)
- CMMI (0)
- IDE-Myeclipse (3)
- PHP (1)
- Algorithm (3)
- C/C++ (18)
- Concept&Items (2)
- Useful WebSite (1)
- ApacheServer (2)
- CodeReading (1)
- Socket (2)
- UML (10)
- PowerDesigner (1)
- Repository (19)
- MySQL (3)
- SqlServer (0)
- Society (1)
- Tomcat (7)
- WebService (5)
- JBoss (1)
- FCKeditor (1)
- PS/DW/CD/FW (0)
- DesignPattern (11)
- WebSite_Security (1)
- WordPress (5)
- WebConstruction (3)
- XML|XSD (7)
- Android (0)
- Project-In-Action (9)
- DatabaseDesign (3)
- taglib (7)
- DIV+CSS (10)
- Silverlight (52)
- JSON (7)
- VC++ (8)
- C# (8)
- LINQ (1)
- WCF&SOA (5)
- .NET (20)
- SOA (1)
- Mashup (2)
- RegEx (6)
- Psychology (5)
- Stock (1)
- Google (2)
- Interview (4)
- HTML5 (1)
- Marketing (4)
- Vaadin (2)
- Agile (2)
- Apache-common (6)
- ANTLR (0)
- REST (1)
- HtmlAnalysis (18)
- csv-export (3)
- Nucth (3)
- Xpath (1)
- Velocity (6)
- ASP.NET (9)
- Product (2)
- CSS (1)
最新评论
-
lt26w:
理解成门面模式应该比较容易明白吧
FacadePattern-Java代码实例讲解 -
lt26w:
看下面的例子比较明白.
FacadePattern-Java代码实例讲解 -
javaloverkehui:
这也叫文档,别逗我行吗,也就自己看看。
HtmlCleaner API -
SE_XiaoFeng:
至少也应该写个注释吧。
HtmlCleaner API -
jfzshandong:
...
org.springframework.web.filter.CharacterEncodingFilter 配置
做了一个SSH的例子,在单击用户治理的时候,报了下面的问题
javax.servlet.ServletException: Cannot retrieve mapping for action /#
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.manage.UsersInfo_jsp._jspService(UsersInfo_jsp.java:79)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
pms.struts.filter.WebFilter.doFilter(WebFilter.java:23)
用户治理的对应action是可以进入的。已经卡了一周了。希望大家可以尽快帮我解决一下。谢谢了!
网友回复:下面是ApplicationContext.xml的内容
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">
<value>com.microsoft.jdbc.sqlserver.SQLServerDriver </value>
</property>
<property name="url">
<value>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=myitem; </value>
</property>
<property name="username">
<value>sa </value>
</property>
<property name="password">
<value> </value>
</property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource"/>
</property>
<property name="mappingResources">
<list>
<value>pms/struts/dto/Users.hbm.xml </value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect </prop>
<prop key="hibernate.show_sql">true </prop>
</props>
</property>
</bean>
<bean id="userDao" class="pms.struts.dao.UsersDao">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<bean name="/index" class="pms.struts.action.IndexAction" singleton="false">
<property name="userDao">
<ref local="userDao"/>
</property>
</bean>
<bean name="/usersInfo" class="pms.struts.action.UsersInfoAction" singleton="false">
<property name="name">
<value>demo </value>
</property>
</bean>
<bean name="/menu" class="pms.struts.action.MenuAction" singleton="false">
</bean>
<bean name="/top" class="pms.struts.action.TopAction" singleton="false">
</bean>
<bean name="/login" class="pms.struts.action.LoginAction" singleton="false">
<property name="usersDao">
<ref local="userDao"/>
</property>
</bean>
</beans>
struts-config.xml文件内容
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources />
<form-beans >
<form-bean name="indexForm"
type="pms.struts.form.IndexForm" />
<form-bean name="loginForm"
type="pms.struts.form.LoginForm" />
</form-beans>
<global-exceptions />
<global-forwards />
<action-mappings >
<action path="/index"
name="indexForm"
type="pms.struts.action.IndexAction"
scope="request">
<forward name="index" path="/index.jsp"/>
<forward name="main" path="/main.jsp"/>
</action>
<action attribute="loginForm"
name="loginForm"
path="/login"
scope="request"
type="pms.struts.action.LoginAction" >
<forward name="login" path="/login.jsp" />
<forward name="manageDefault" path="/manage/Default.jsp" />
</action>
<action
path="/menu"
scope="request"
type="pms.struts.action.MenuAction">
<forward name="menu" path="/manage/MenuPage.jsp" />
</action>
<action path="/top" type="pms.struts.action.TopAction">
<forward name="top" path="/manage/top.jsp" />
</action>
<action
path="/usersInfo"
scope="request"
type="pms.struts.action.UsersInfoAction"
validate="false">
<forward name="usersinfo" path="/manage/UsersInfo.jsp" />
</action>
</action-mappings>
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor">
</controller>
<message-resources parameter="pms.struts.ApplicationResources" />
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
</struts-config>
主html页面内容
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> </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">
-->
<link rel="stylesheet" type="text/css" href="../css/common.css">
</head>
<frameset framespacing="0" frameborder="no" border="0" rows="10%,*">
<frame name="topFrame" noresize="noresize" frameborder="yes" src="top.do"/>
<frameset framespacing="0" cols="30%,*" frameborder="no">
<frame name="meanuFrame" frameborder="yes" noresize="noresize" src="menu.do"/>
<frame name="mainFrame" frameborder="no" noresize="noresize" />
</frameset>
</frameset>
<body>
</body>
</html>
用户治理页面的html内容
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*,pms.struts.dto.*" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template" prefix="template" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />
<title>用户信息治理 </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">
-->
<link rel="stylesheet" type="text/css" href="css/common.css" >
</head>
<body>
<html:form action="#" method="post" name="usersForm">
<table width="100%">
<tr>
<td>
</td>
</tr>
<tr>
<td name="TdWidth100">
<table width="100%" name="TableBorder">
<tr>
<td name="TdWidth100">
用户治理
</td>
</tr>
</table>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
网友回复:谢谢大家了!!
网友回复:你action写成 action="#" 那怎么找的到呢
网友回复: <html:form action="#" method="post" name="usersForm"> 改成Action中path对应的路径,如:
<html:form action="/login.do" >
网友回复:谢谢了!!没想到犯了这个低级错误了。
发表评论
-
fckedit和struts2集成不能上传文件的解决方法
2010-01-24 10:52 1621以前在使用fckedit+strut1上传文件很顺利,后来使用 ... -
struts validator框架
2010-01-09 13:56 1430Struts 验证器基础 步骤 1. 安装 Strut ... -
The path of an ForwardConfig cannot be null-struts validator验证框架异常
2010-01-09 13:54 3050struts validator验证框架异常 在测 ... -
关于一个Action对应多个Form
2009-12-28 23:49 1512由于一个Action可以用多个path来访问,所以我们可以通过 ... -
一个Action对应多个Form DispatchAction
2009-12-28 23:32 2712一个Action对应多个Form ... -
DynaValidatorForm类
2009-12-28 23:23 1290DynaValidatorForm类 http ... -
Struts出现No getter method for property的解决
2009-12-28 22:48 2014请从一下几方面着手检查代码 1、JavaBean中的属性 ... -
Struts Validator验证器使用指南
2009-12-07 18:34 788Struts Validator 验证器 ... -
Form '***' not found for locale 'zh _CN'
2009-12-07 16:13 4372Form '***' not found for locale ... -
Struts2 拦截器详细配置过程
2009-12-06 21:23 18241:所有拦截器的超级接口Interceptor ,Ac ... -
如何在SSH框架中使用Validator框架
2009-12-05 00:19 1334关键字: validator 下 ... -
java.lang.NoSuchMethodException
2009-12-04 23:56 2052关键字: validator 下面将介绍如何在SSH框架 ... -
Struts验证框架与一些技巧
2009-12-04 23:46 16498还是通过一些步骤例子说明 首先建立Struts工程的时候要 ... -
Struts-validator验证框架与一些技巧
2009-12-04 23:44 1161这个框架褒贬不一呀~~~ =========== ... -
struts 标签详解
2009-12-04 21:28 1044struts 标签详解 Action和jsp的开发其实就 ... -
HTTP Status 404 - Servlet action is not available(二)
2009-12-04 18:41 5874今天在帮公司的新手弄SSH的一个登录程序时,出现了Servle ... -
HTTP Status 404 - Servlet action is not available(一)
2009-12-04 18:40 7831sp /meCall 发表于2007-10-08, 1 ... -
Cannot retrieve mapping for action 之 问题解决
2009-12-04 18:21 11343struts的form标 ... -
利用Struts的Validator验证框架实现客户端和服务器端双验证
2009-12-04 18:18 1548... -
struts的parameter功能
2009-12-04 17:32 1078没有struts之前,使用servlet,最常用的是d ...
相关推荐
1 异常 javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login (/Login是你的action名字) 可能原因:action没有再struts-config.xml 中定义,或没有找到匹配的action,例如在JSP文件中使用 ...
当你看到"Cannot retrieve mapping for action /Login"这样的异常时,通常表示Struts无法在`struts-config.xml`配置文件中找到对应的action定义。这可能是由于以下几个原因: - 在`struts-config.xml`中没有定义名...
例如,在struts-config.xml文件中没有配置companyNews的action,引发javax.servlet.ServletException: Cannot retrieve mapping for action /companyNews。 解决方法:在struts-config.xml文件中添加companyNews的...
当遇到“Cannot retrieve mapping for action /Login”这样的异常时,通常是因为在`struts-config.xml`配置文件中没有正确地定义Action或者找不到与之匹配的Action。确保你的JSP页面中提交的表单URL(如`...
CentOS系统yum源使用报错:Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge.-附件资源
7. “Cannot retrieve mapping for action XXX” 这个错误通常发生在 .jsp 的标签里指定 action='/XXX' ,但这个 Action 并未在 struts-config.xml 里设置过。解决方法是检查 struts-config.xml 文件,确保 Action ...
首先,我们来看第一个异常:“javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login”。这个异常通常意味着在Struts配置文件(struts-config.xml)中没有正确定义或找不到对应的Action。在JSP...
#### 一、异常 javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login **异常描述**: 该异常通常出现在尝试访问一个未在`struts-config.xml`文件中正确配置的Action时。具体表现为无法获取...
1. **Cannot retrieve mapping for action 异常** 当尝试访问一个未在`struts-config.xml`中定义的Action时,会出现此异常。这可能是因为你在JSP文件中指定了一个不存在的Action,如`<html:form action="Login.do">...
Retrieve Form for Data Capture (RFD)
1. 异常 javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login 这个错误表明在struts-config.xml中没有为/L Login定义Action Mapping。确保在配置文件中正确地声明了Action,如: ```xml ...
1. 异常`javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login` 这个错误表明在`struts-config.xml`中没有为`/Login`动作定义映射,或者找不到匹配的动作。检查`struts-config.xml`的`...
使用PL/SQL登录ORACLE数据 报错,error while trying to retrieve text for error ORA-01804,的解决方法,操作步骤,在windows server 2008R2 64位,oracle 12C,PLSQL Developer 12 64位,以上使用环境正常,
1. Cannot retrieve mapping for action/submitUpdateStuffTimeRecordAction 这是Struts框架中一个常见的错误,错误信息表明无法找到相应的Action mapping。解决方法是检查Struts配置文件中的action mappings,确保...
在这个“SSH架构整合的Dept、Emp的CRUD”项目中,我们看到的是对两个核心数据库实体——“Dept”(部门)和“Emp”(员工)进行的创建(Create)、读取(Retrieve)、更新(Update)和删除(Delete)操作的实现。 首先,...
Hibernate是SSH中的持久层框架,它简化了Java对象与数据库之间的映射关系,实现了ORM(Object-Relational Mapping)。Hibernate提供了丰富的API和查询语言(HQL),使得开发者可以方便地进行数据的CRUD操作,无需关注...
javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login/LoginAction 这种异常通常发生在使用Struts框架时,当JSP页面尝试访问一个未在`struts-config.xml`中定义的Action时会抛出此异常。...
We propose a novel Knowledge-driven Encode, Retrieve, Paraphrase (KERP) approach which reconciles traditional knowledge- and retrieval-based methods with modern learning-based methods for accurate ...
Aspen安装教程,如果安装过程中提示licence cannot retrieve,重新安装下install_Sentinel.RMS.8.5.1.Server,安装完成后如果提示不能获取证书,需要把C:\Program Files\Common Files\AspenTech Shared中的STRGXI2....