![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
三大框架之strut2
文章平均质量分 69
WlHelloWorld
这个作者很懒,什么都没留下…
展开
-
struts2中分页实现
web.xml的配置struts.xml的配置jsp的页面的代码:实现当页面到了第一页了就变成原来的链接变成字"上一页",到了最后 一页实现同样的效果action的代码dao层的代码实现原创 2012-12-27 14:52:31 · 477 阅读 · 0 评论 -
struts2 result type 介绍
在默认时,标签的type属性值是“dispatcher”(实际上就是转发,forward)。开发人员可以根据自己的需要指定不同的类型,如redirect、stream等。如下面代码所示: /result.jsp这此result-type可以在struts2-core-2.0.11.1.jar包或struts2源代码中的struts-default.转载 2013-05-09 10:01:52 · 791 阅读 · 0 评论 -
The Struts dispatcher cannot be found
The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, w原创 2013-04-01 16:58:40 · 1617 阅读 · 0 评论 -
Struts2中拦截器与过滤器的执行顺序
web.xmlxmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/j2原创 2013-01-22 15:08:04 · 726 阅读 · 0 评论 -
org.hibernate.NonUniqueObjectException异常解决方法
异常:org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session代码片段:注:以下为session打开的状态* 我手动构造了一个Photo对象Photo photo=new Pho转载 2013-01-22 16:18:55 · 585 阅读 · 0 评论 -
ajax中文乱码解决方法
网上这样类似的帖子很多,但是发现这篇帖子对我的程序没有任何帮助。有些受到误导,但是还是有一定的价值的,所以在此贴出。供后来者参考。但是请注意我用红色标记的地方,因为这格方法对我的程序没有用,发现很多的跟帖者,页说这格方法不能用。不知道这是什么原因。如果你知道的话,不妨高速俺下。很感谢用过AJAX的朋友肯定知道javascript是使用UTF-8国际编码,即每个汉字用4个字节来存储,原创 2013-01-22 15:33:01 · 717 阅读 · 0 评论 -
Illegal access: this web application instance has been stopped already.
先看出错信息:(其实这个报错,就是不顺眼,不会影响工程的。) 2010-2-8 20:33:56 org.apache.catalina.core.StandardContext reload信息: Reloading this Context has started********** Remove Context 99999999992010-2-8 20:33:5原创 2013-01-17 16:26:15 · 33546 阅读 · 2 评论 -
Struts2 标签库讲解
要使用Struts2的标签,只需要在JSP页面添加如下一行定义即可:struts2的标签共分为五大类:一、逻辑控制标签用于进行逻辑控制输出。主要分以下几类:1)条件标签:用于执行基本的条件流转:拥有一个test属性,其表达式的值用来决定标签里内容是否显示。欢迎hzd:同上。2)迭代标签:用于遍历集合(java.util.Collection)或者枚举值(ja原创 2013-01-06 14:23:42 · 474 阅读 · 0 评论 -
在MyEclipse中使用debug模式
在MyEclipse中使用debug模式1, 首先在一个java文件中设断点,然后运行,当程序走到断点处就会转到debug视图下,2, F5键与F6键均为单步调试,F5是step into,也就是进入本行代码中执行,F6是step over,也就是执行本行代码,跳到下一行,3,F7是跳出函数4,F8是执行到最后。1.Step Into (also F5) 跳入2.S转载 2013-01-04 10:50:16 · 554 阅读 · 0 评论 -
java.lang.NoClassDefFoundError: org/apache/commons/io/output/NullOutputStream
java.lang.NoClassDefFoundError: org/apache/commons/io/output/NullOutputStream Could not create JarEntryRevision for [jar:file:/E:/JAVA/Tarena-FTP/apache-tomcat-6.0.30-win/apache-tomcat-6.0.30/weba原创 2012-12-28 20:24:34 · 2831 阅读 · 0 评论 -
Action中方法的访问
第一种:method="{1}" 中Login_*带*是什么意思?method= "{1} "带{}这个是什么意思? ==================================================== name= "Login_* " 代表这个action处理所有以Login_开头的请求 method= "{1} " 根据前面请求Login_met原创 2012-12-27 21:15:06 · 670 阅读 · 0 评论 -
启动Tomcat6.x时manager does not exist or is not a readable directory
启动Tomcat6.x时manager does not exist or is not a readable directory启动Tomcat6.x时manager does not exist or is not a readable directory 收藏在MyEclipse中配置好Tomcat,新建web项目,在启动Tomcat时会出现 严重: Erro转载 2012-12-27 15:31:31 · 793 阅读 · 0 评论 -
struts2的环境搭建
手动搭建struts2环境 a、JAR文件的导入 commons-fileupload-1.2.1.jar commons-io-1.3.2.jar freemarker-2.3.16.jar javassist-3.7.ga.jar ognl-3.0.jar struts2-core-2.2.1.jar xwork-core-2.2.1.jar原创 2012-12-26 13:30:17 · 760 阅读 · 2 评论 -
使用JUnit在struts+spring+hibernate框架环境下进行单元测试
过往使用的方式从最原始的IDE的DEBUG工具断点查错到目前还在用最快捷的使用文字输出(log或system.out)。 这些调试方式不是说不好,但有些情况下达不到自己的需求,浪费了一些时间,因为在SSH的环境下修改的源码就意味着要部署。 有个误区,有的人认为把ApplicationServer的热部署方式设置为ture,就不用部署了。其实实际还是重新部署了一遍,只是不需要你按键罢了。转载 2013-06-17 15:40:46 · 1840 阅读 · 0 评论