
struts2
qq_34721505
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
struts2中struts.xml常用配置
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN""http://struts.apache.org/dtds/struts-2.3.dtd"> /index.jsp${name}/erro原创 2016-11-12 20:32:12 · 284 阅读 · 0 评论 -
在web.xml中将欢迎页设置为action的2种方案
在web.xml中将欢迎页设置为action的几种方案方案一:1、在web.xml中添加如下内容: 2、在web.xml中配置欢迎页 3、在index.jsp中添加如下代码: 4、在struts.xml中配置如下内容: 方案二 :1、在web.xml中配置欢迎页为action 2、在webContent目录下配置一个空文件login.actio原创 2017-05-07 21:57:38 · 1394 阅读 · 0 评论 -
struts处理.do后缀请求报Struts2中关于"There is no Action mapped for namespace / and action name"的总结
大家都知道struts2默认处理后缀名为.action的请求,但有时想修改action的后缀名为.do,反复试了很多次总是报“There is no Action mapped for namespace "/" and action name...”,整了半天终于找到原因,特记录如下,希望其他童鞋不再落入此坑中....因为项目比较简单,此处只展示部分代码。一、登录的jsp页面:SUM原创 2017-06-29 11:51:46 · 843 阅读 · 0 评论 -
Unsupported major.minor version 51.0(unable to load class org.apache.struts2.dispatcher.filter.Strut
最近在搭一个struts2框架,一开始使用的JDK版本是1.8、struts2版本是2.5,项目正常运行。但把项目导入到另一台电脑上,启动时报错:Unsupported major.minor version 51.0(unable to load class org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter)原创 2017-06-23 11:26:25 · 2620 阅读 · 0 评论 -
struts2获取<s:checkbox>的值为true
最近在写一个struts2的项目,使用了struts2标签,JSP页面代码如下:后台获取复选框的值时,结果总为true,并非我们想要的:box或run; 查找资料并经本人测试,原因如下,s:checkbox>获取值的属性是:fieldValue而非value,后修改JSP页面代码如下,获取前台页面的值成功。控制台输出结果:爱好:【run,box】原创 2017-07-04 11:30:03 · 1817 阅读 · 0 评论 -
struts2文件下载方法一
因为网上关于原理的解释比较多,此处直接上源码。一、JSP页面:struts2文件下载二、struts.xml配置:<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.原创 2017-07-18 10:39:44 · 743 阅读 · 0 评论 -
struts2下载中文名称的文件
一、在服务器的应用中存在如下文件:常用网站.txt;二、struts-download.xml中的内容如下:<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd原创 2017-07-18 15:07:46 · 843 阅读 · 0 评论