Stripes最基本的实现是类似于Struts的请求,但没有Struts那么配置繁琐。下面就来看看怎样实现一个web应用的Action访问操作。本篇博文为设计Stripes的三种访问方式:普通Action的映射访问、类Servlet访问方式、Rest变参访问方式。前几天还没将Stripes应用示例打通,今天又本着不..
分类:
其他好文 时间:
2014-07-29 18:17:22
阅读次数:
440
前面是变量,后面是调用变量的解释
{pc:content
action="position"posid="12" thumb="1" order="id desc"num="10"}
图片新闻
{pc:contentaction="lists" catid="$r[catid]" num="1"thumb="1" order="id desc" return="info"}...
分类:
Web程序 时间:
2014-07-29 18:04:13
阅读次数:
363
一般我们会在过滤器里判断登录状态,如果没登录就跳转登录页面,过滤器java核心代码如下:
UserItem loginUser = (UserItem)request.getSession().getAttribute("loginUser");
if(loginUser == null) {
response.sendRedirect("/login.action");
}这个对于普通页面来...
分类:
其他好文 时间:
2014-07-29 18:03:32
阅读次数:
194
1,Struts是MVC框架的一种实现,通过Struts的ActionForm可以完成数据的验证,通过Action可以完成与Servlet一样的功能。
2,Struts的所有请求都是通过*.do的路径提交到相应的Action上去的,所有的Action都需要在struts-config.xml文件进行配置。
3,在Struts中所有的资源信息都是通过ApplicationReso...
分类:
其他好文 时间:
2014-07-29 18:00:12
阅读次数:
237
一、前台向后台请求数据
在页面加载时,有时需要对一些表单进行初始化,此时可以利用JQuery的 get 函数向后台发起异步请求:
//初始化函数function initSettings() {
$.get("?Action=init", function (data) {
if (data == "NO") {
aler...
分类:
Web程序 时间:
2014-07-29 17:49:22
阅读次数:
246
1. ActionContext 在Struts2开发中,除了将请求参数自动设置到Action的字段中,我们往往也需要在Action里直接获取请求(Request)或会话 (Session)的一些信息,甚至需要直接对JavaServlet Http的请求(HttpServletReque...
分类:
其他好文 时间:
2014-07-29 16:12:59
阅读次数:
205
网上虽然有很多关于zabbix报警配置的文章,但是大多都是转载,而且内容并不详荆本人根据zabbix的现网部署经验,做了如下总结,并尽量做到内容细致全面,能让新手快速配置成功。如有疏忽,请各位指出。首先配置顺序如下:创建用户媒介-->创建用户组和用户-->针对trigger(..
分类:
其他好文 时间:
2014-07-29 15:23:39
阅读次数:
450
Description
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea beh...
分类:
其他好文 时间:
2014-07-29 15:08:28
阅读次数:
232
IllegalStateException: Can not perform this action after onSaveInstanceState 错误总结!...
分类:
其他好文 时间:
2014-07-29 14:48:48
阅读次数:
220
方法一:Uri updateUri = Uri.fromFile(file); Intent updateIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, updateUri); sendBroadcast(update...
分类:
移动开发 时间:
2014-07-29 14:09:18
阅读次数:
256