1、struts2框架介绍 struts2是一个非常优秀的MVC框架,MVC思想将一个应用分为三个部分:Model(模型)、View(视图)、Controller(控制层)这三个部分以最少的耦合协同工作,从而提高应用的可扩展性及维护性。2、struts2下载与配置 1)http://struts.....
分类:
其他好文 时间:
2015-07-07 12:25:48
阅读次数:
119
以验证用户名(Email)重复与否为例设置1、Model中需要远程验证的属性,新增RemoteAttribute,传入远程验证需要的Controller以及Action名称,也可以设置使用的HTTP方法,并定义错误信息。[Remote("UniqueEmail","Users",HttpMethod...
分类:
Web程序 时间:
2015-07-07 10:46:31
阅读次数:
166
什么是MVC模式模式:一种解决问题的方法设计模式 :工厂模式、适配器模式、观察者模式等框架模式 :MVC、MVP、MVVM等(框架模式里有很多设计模式)MVC:M-ModelV-ViewC-Controller(连接M和V) 2. MVC模式的思想把M和V分开服务器端MVC模式非常容易实现 3......
分类:
其他好文 时间:
2015-07-07 00:47:08
阅读次数:
101
MVC 是一种使用 MVC(Model View Controller 模型-视图-控制器)设计创建 Web 应用程序的模式:Model(模型)表示应用程序核心(比如数据库记录列表)。View(视图)显示数据(数据库记录)。Controller(控制器)处理输入(写入数据库记录)。MVC 模式同时提...
分类:
Web程序 时间:
2015-07-06 23:07:17
阅读次数:
304
在"ASP.NET MVC与Sql Server交互, 插入数据"中,在Controller中拼接sql语句。比如: _db.InsertData("insert into Product(Name,quantity,Price) values('"+productVm.Name+"','"+pro...
分类:
数据库 时间:
2015-07-06 23:03:27
阅读次数:
219
### Rails 异常处理 的多种处理方法
1. routes match '*path', via: :all, to: 'controller#action'
2. application.rb 的 exception_app
```ruby
# application.rb
config.exceptions_app = ->(env) ...
分类:
其他好文 时间:
2015-07-06 19:53:39
阅读次数:
93
java.lang.IllegalStateException: The mapped controller method class 'com.xx.controller.xxController' is not an instance of theactual controller bean i...
分类:
编程语言 时间:
2015-07-06 19:21:38
阅读次数:
300
问题很简单是解析器定义问题SpringMVC默认解析器不能解析带文件格式的multipart/form-data ContentType需要修改成
分类:
编程语言 时间:
2015-07-06 17:24:23
阅读次数:
327
1.ios里面传值的方式很多中现在介绍几种常用的传值方式:第一种: 属性传值方式:首先要建两个controller 分别为 RootviewController和 DetailviewController在Detailviewcontrooler.h实现的代码:(暴露出属性)#import @int...
分类:
移动开发 时间:
2015-07-06 15:51:23
阅读次数:
127
(一)index 主页定义函数controller:控制器action:将这个也页面转到某个页面去。using mvc_1_.Models;using System;using System.Collections.Generic;using System.Linq;using System.Web...
分类:
数据库 时间:
2015-07-06 15:33:40
阅读次数:
162