08 2015 档案

摘要:As you learnt from the Struts 2 architecture, when you click on a hyperlink or submit an HTML form in a Struts 2 web application, the input is collect... 阅读全文
posted @ 2015-08-28 16:47 wuhn 阅读(403) 评论(0) 推荐(0)
摘要:From a high level, Struts2 is a pull-MVC (or MVC2) framework. The Model-View-Controller pattern in Struts2 is realized with following five core compon... 阅读全文
posted @ 2015-08-28 16:33 wuhn 阅读(423) 评论(0) 推荐(0)
摘要:Our first task is to get a minimal Struts 2 application running. This chapter will guide you on how to prepare a development environment to start your... 阅读全文
posted @ 2015-08-28 16:23 wuhn 阅读(293) 评论(0) 推荐(0)
摘要:Struts2 is popular and mature web application framework based on the MVC design pattern. Struts2 is not just the next version of Struts 1, but it is a... 阅读全文
posted @ 2015-08-28 16:14 wuhn 阅读(193) 评论(0) 推荐(0)
摘要:Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern ... 阅读全文
posted @ 2015-08-28 16:08 wuhn 阅读(234) 评论(0) 推荐(0)
摘要:Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the f... 阅读全文
posted @ 2015-08-28 15:36 wuhn 阅读(236) 评论(0) 推荐(0)
摘要:The Struts `DynaActionForm` class is an interesting feature to let you create a form bean dynamically and declaratively. It enables you to create a “v... 阅读全文
posted @ 2015-08-28 15:34 wuhn 阅读(279) 评论(0) 推荐(0)
摘要:Struts `MappingDispatchAction` class is used to group similar functionality into a single action class, and execute the function depends on `parameter... 阅读全文
posted @ 2015-08-28 13:41 wuhn 阅读(325) 评论(0) 推荐(0)
摘要:The `DispatchActio`n class (`org.apache.struts.actions.DispatchAction`) provides a way to group all related functions into a single action class. It’s... 阅读全文
posted @ 2015-08-28 13:35 wuhn 阅读(245) 评论(0) 推荐(0)
摘要:In Struts MVC model, you have to go thought the Action Controller to get a new view page. In some cases, you really just need to get a specified JSP p... 阅读全文
posted @ 2015-08-28 13:33 wuhn 阅读(205) 评论(0) 推荐(0)
摘要:Struts wildcards can helps to reduce the repetition in your `struts-config.xml` file, as long as your Struts project is following some regular file st... 阅读全文
posted @ 2015-08-28 13:29 wuhn 阅读(189) 评论(0) 推荐(0)
摘要:Many developers like to put all Struts related stuff (action, form) into a single Struts configuration file. It’s fast for the initial development but... 阅读全文
posted @ 2015-08-28 13:26 wuhn 阅读(255) 评论(0) 推荐(0)
摘要:Every website need a welcome or default page as an entry point. Here’s 3 ways to configure a welcome page in Struts.##1. index.jspThe simplest way is ... 阅读全文
posted @ 2015-08-28 13:20 wuhn 阅读(334) 评论(0) 推荐(0)
摘要:In Struts framework, you always need to configure the Struts tag libraries in order to access it in view page (JSP). There are two ways to configure i... 阅读全文
posted @ 2015-08-28 13:18 wuhn 阅读(183) 评论(0) 推荐(0)
摘要:In this tutorial we show you how to develop a hello world web application using classic Struts 1.3 framework.Tools and technologies used :- Struts 1.3... 阅读全文
posted @ 2015-08-28 13:02 wuhn 阅读(328) 评论(0) 推荐(0)
摘要:Wicket examples is a good place to learn Apache Wicket by examples, and a must reference site for new or experienced Wicket’s developers. In this Wick... 阅读全文
posted @ 2015-08-28 08:02 wuhn 阅读(529) 评论(0) 推荐(0)
摘要:A simple hello world example in Wicket, show the basic structure of Wicket web application.Tools and technologies used in this article- Apache Wicket ... 阅读全文
posted @ 2015-08-28 07:58 wuhn 阅读(385) 评论(0) 推荐(0)
摘要:In JSF , “`h:panelGrid`” tag is used to generate HTML table tags to place JSF components in rows and columns layout, from left to right, top to bottom... 阅读全文
posted @ 2015-08-28 07:51 wuhn 阅读(293) 评论(0) 推荐(0)
摘要:In JSF, ``, `` and `` tags are used to render a HTML “`a`” anchor element, see below examples to understand the different among them.> Note> In below ... 阅读全文
posted @ 2015-08-28 07:47 wuhn 阅读(463) 评论(0) 推荐(0)
摘要:In JSF 2.0, both `` and `` tags are used to render HTML input element of type button, with different mechanism to handle the navigation.##1. JSF `h:co... 阅读全文
posted @ 2015-08-28 07:37 wuhn 阅读(314) 评论(0) 推荐(0)
摘要:In JSF 2.0, you can use `` tag to render a HTML “script” element, and link it to a js file.For example,``````It will generate following HTML output…``... 阅读全文
posted @ 2015-08-28 07:33 wuhn 阅读(250) 评论(0) 推荐(0)
摘要:In JSF 2.0, you can use `` output a css file.For example,``````It will generate following HTML output…``````##JSF outputStylesheet exampleAn example t... 阅读全文
posted @ 2015-08-28 07:31 wuhn 阅读(299) 评论(0) 推荐(0)
摘要:In JSF, you can use `` tag to render a HTML “`img`” element. For example, an image named “`sofa.png`” in a resources folder, see figure below :![jsf2-... 阅读全文
posted @ 2015-08-28 07:29 wuhn 阅读(297) 评论(0) 推荐(0)
摘要:In JSF 2.0 web application, “`h:outputText`” tag is the most common used tag to display plain text, and it doesn’t generate any extra HTML elements. S... 阅读全文
posted @ 2015-08-28 07:28 wuhn 阅读(228) 评论(0) 推荐(0)
摘要:In JSF, `` tag is used to render a multiple select dropdown box – HTML select element with “`multiple`” and “`size=1`” attribute.```//JSF... ... 阅读全文
posted @ 2015-08-28 07:24 wuhn 阅读(281) 评论(0) 推荐(0)
摘要:In JSF, `` tag is used to render a dropdown box – HTML select element with “`size=1`” attribute.```//JSF... ``````//HTML output... ```##`h:... 阅读全文
posted @ 2015-08-28 07:21 wuhn 阅读(320) 评论(0) 推荐(0)
摘要:In JSF, `` tag is used to render a multiple `select` listbox – HTML `select` element with “`multiple`” and “`size`” attribute.```//JSF... `... 阅读全文
posted @ 2015-08-28 07:17 wuhn 阅读(543) 评论(0) 推荐(0)
摘要:In JSF, `` tag is used to render a single select listbox – HTML select element with “size” attribute.```//JSF... ``````//HTML output... `... 阅读全文
posted @ 2015-08-28 07:12 wuhn 阅读(436) 评论(0) 推荐(0)
摘要:In JSF, “`h:selectOneRadio`” tag is used to render a set of HTML input element of type “`radio`“, and format it with HTML table and label tag.```//JSF... 阅读全文
posted @ 2015-08-28 07:08 wuhn 阅读(356) 评论(0) 推荐(0)
摘要:In JSF, `` tag is used to render a single HTML input element of “`checkbox`” type.```//JSF... Remember Me//HTML output... Remember Me```While ` ` tag... 阅读全文
posted @ 2015-08-27 18:58 wuhn 阅读(305) 评论(0) 推荐(0)
摘要:In JSF, you can use the `` tag to render a HTML hidden value field. For example,##JSF tag…``````Render this HTML code…``````##JSF hidden field example... 阅读全文
posted @ 2015-08-27 18:46 wuhn 阅读(241) 评论(0) 推荐(0)
摘要:In JSF, you can use the `` tag to render a HTML textarea field. For example,##JSF tag…``````Render this HTML code…``````##JSF textarea exampleA full J... 阅读全文
posted @ 2015-08-27 18:42 wuhn 阅读(314) 评论(0) 推荐(0)
摘要:In JSF, you can use the `` tag to render a HTML input of `type=”password”`, password field. For example,JSF tag…``` ```Render this HTML code…``````> P... 阅读全文
posted @ 2015-08-27 18:39 wuhn 阅读(250) 评论(0) 推荐(0)
摘要:In JSF, you can use the `` tag to render a HTML input of `type=”text”`, text box. For example,##JSF tag…``` ```Render this HTML code…``````> P.S The `... 阅读全文
posted @ 2015-08-27 18:35 wuhn 阅读(240) 评论(0) 推荐(0)
摘要:In JSF 2.0, coding Ajax is just like coding a normal HTML tag, it’s extremely easy. In this tutorial, you will restructure the last JSF 2.0 hello worl... 阅读全文
posted @ 2015-08-27 01:30 wuhn 阅读(250) 评论(0) 推荐(0)
摘要:##JSF 体系结构:JSF 的主要优势之一就是它既是Java Web应用程序的用户界面标准又是严格遵循模型-视图-控制器 (MVC) 设计模式的框架。用户界面代码(视图)与应用程序数据和逻辑(模型)的清晰分离使 JSF 应用程序更易于管理。为了准备提供页面对应用程序数据访问的 JSF 上下文和防止... 阅读全文
posted @ 2015-08-27 01:22 wuhn 阅读(223) 评论(0) 推荐(0)
摘要:In this tutorial, we will show you how to develop a JavaServer Faces (JSF) 2.0 hello world example, shows list of JSF 2.0 dependencies, basic annotati... 阅读全文
posted @ 2015-08-27 01:08 wuhn 阅读(262) 评论(0) 推荐(0)
摘要:In Spring MVC application, `MultiActionController` is used to group related actions into a single controller, the method handler have to follow below ... 阅读全文
posted @ 2015-08-24 17:25 wuhn 阅读(261) 评论(0) 推荐(0)
摘要:Often times, you may mix use of multiple handler mappings strategy in Spring MVC development.For example, use `ControllerClassNameHandlerMapping` to m... 阅读全文
posted @ 2015-08-24 17:16 wuhn 阅读(158) 评论(0) 推荐(0)
摘要:In Spring MVC application, the `SimpleUrlHandlerMapping` is the most flexible handler mapping class, which allow developer to specify the mapping of U... 阅读全文
posted @ 2015-08-24 17:14 wuhn 阅读(166) 评论(0) 推荐(0)
摘要:handler mapping是把url跟控制器关联起来。In Spring MVC, `ControllerClassNameHandlerMapping` use convention to map requested URL to Controller (convention over con... 阅读全文
posted @ 2015-08-24 17:11 wuhn 阅读(470) 评论(0) 推荐(0)
摘要:In Spring MVC, `BeanNameUrlHandlerMapping` is the default handler mapping mechanism, which maps URL requests to the name of the beans. For example,```... 阅读全文
posted @ 2015-08-24 16:32 wuhn 阅读(191) 评论(0) 推荐(0)
摘要:In this tutorial, we will take the previous Gradle + Spring MVC XML example, rewrite it to support `@JavaConfig` annotation configuration, no more XML... 阅读全文
posted @ 2015-08-24 16:23 wuhn 阅读(743) 评论(0) 推荐(0)
摘要:In this tutorial, we will show you a Gradle + Spring 4 MVC, Hello World Example (JSP view), XML configuration.Technologies used :- Gradle 2.0- Spring ... 阅读全文
posted @ 2015-08-24 16:17 wuhn 阅读(512) 评论(0) 推荐(0)
摘要:In `JdbcTemplate`, SQL parameters are represented by a special placeholder “`?`” symbol and bind it by position. The problem is whenever the order of ... 阅读全文
posted @ 2015-08-23 14:56 wuhn 阅读(211) 评论(0) 推荐(0)
摘要:In this tutorial, we show you how to use `batchUpdate()` in `SimpleJdbcTemplate` class.See `batchUpdate()` example in `SimpleJdbcTemplate` class.```//... 阅读全文
posted @ 2015-08-23 14:53 wuhn 阅读(329) 评论(0) 推荐(0)
摘要:Here are few examples to show how to use `SimpleJdbcTemplate query()` methods to query or extract data from database. In `JdbcTemplate` `query()`, you... 阅读全文
posted @ 2015-08-23 14:50 wuhn 阅读(188) 评论(0) 推荐(0)
摘要:In some cases, you may required to insert a batch of records into database in one shot. If you call a single insert method for every record, the SQL s... 阅读全文
posted @ 2015-08-23 14:45 wuhn 阅读(616) 评论(0) 推荐(0)
摘要:Here are few examples to show you how to use `JdbcTemplate` `query()` methods to query or extract data from database.##1. Querying for Single RowHere’... 阅读全文
posted @ 2015-08-23 14:42 wuhn 阅读(304) 评论(0) 推荐(0)
摘要:In Spring JDBC development, you can use `JdbcTemplate` and `JdbcDaoSupport` classes to simplify the overall database operation processes.In this tutor... 阅读全文
posted @ 2015-08-23 14:36 wuhn 阅读(155) 评论(0) 推荐(0)
摘要:In this tutorial, we will extend last Maven + Spring hello world example by adding JDBC support, to use Spring + JDBC to insert a record into a custom... 阅读全文
posted @ 2015-08-23 14:31 wuhn 阅读(239) 评论(0) 推荐(0)
摘要:For those don’t like annotation or using JDK 1.4, you can use AspectJ in XML based instead.Review last `customerBo` interface again, with few methods,... 阅读全文
posted @ 2015-08-23 14:24 wuhn 阅读(387) 评论(0) 推荐(0)
摘要:In this tutorial, we show you how to integrate AspectJ annotation with Spring AOP framework. In simple, Spring AOP + AspectJ allow you to intercept me... 阅读全文
posted @ 2015-08-23 14:04 wuhn 阅读(613) 评论(0) 推荐(0)
摘要:In last Spring AOP examples – advice, pointcut and advisor, you have to manually create a proxy bean (`ProxyFactoryBean`) for each beans whose need AO... 阅读全文
posted @ 2015-08-23 02:29 wuhn 阅读(278) 评论(0) 推荐(0)
摘要:##ProblemThe Spring AOP transaction is not working in following interceptors?``` ```The “`matchGenericTxInterceptor`” trans... 阅读全文
posted @ 2015-08-23 02:22 wuhn 阅读(381) 评论(0) 推荐(0)
摘要:In last Spring AOP advice examples, the entire methods of a class are intercepted automatically. But for most cases, you may just need a way to interc... 阅读全文
posted @ 2015-08-23 02:17 wuhn 阅读(330) 评论(0) 推荐(0)
摘要:> Spring AOP + AspectJ> Using AspectJ is more flexible and powerful.Spring AOP (Aspect-oriented programming) framework is used to modularize cross-cut... 阅读全文
posted @ 2015-08-22 15:01 wuhn 阅读(274) 评论(0) 推荐(0)
摘要:In Spring, `@Qualifier` means, which bean is qualify to autowired on a field. See following scenario :##Autowiring ExampleSee below example, it will a... 阅读全文
posted @ 2015-08-22 14:44 wuhn 阅读(269) 评论(0) 推荐(0)
摘要:In last Spring auto-wiring in XML example, it will autowired the matched property of any bean in current Spring container. In most cases, you may need... 阅读全文
posted @ 2015-08-22 14:40 wuhn 阅读(313) 评论(0) 推荐(0)
摘要:In Spring, “Autowiring by AutoDetect“, means chooses “autowire by constructor” if default constructor (argument with any data type), otherwise uses “a... 阅读全文
posted @ 2015-08-22 13:03 wuhn 阅读(283) 评论(0) 推荐(0)
摘要:In Spring, “Autowiring by Constructor” is actually autowiring by Type in constructor argument. It means, if data type of a bean is same as the data ty... 阅读全文
posted @ 2015-08-22 11:41 wuhn 阅读(249) 评论(0) 推荐(0)
摘要:In Spring, “Autowiring by Name” means, if the name of a bean is same as the name of other bean property, auto wire it.For example, if a “`customer`” b... 阅读全文
posted @ 2015-08-22 11:38 wuhn 阅读(232) 评论(0) 推荐(0)
摘要:In Spring, “Autowiring by Type” means, if data type of a bean is compatible with the data type of other bean property, auto wire it.For example, a “`p... 阅读全文
posted @ 2015-08-22 11:35 wuhn 阅读(217) 评论(0) 推荐(0)
摘要:In Spring framework, you can wire beans automatically with auto-wiring feature. To enable it, just define the “`autowire`” attribute in ``.``` ```In S... 阅读全文
posted @ 2015-08-22 11:30 wuhn 阅读(211) 评论(0) 推荐(0)
摘要:In this Spring auto component scanning tutorial, you learn about how to make Spring auto scan your components. In this article, we show you how to do ... 阅读全文
posted @ 2015-08-22 11:07 wuhn 阅读(181) 评论(0) 推荐(0)
摘要:Normally you declare all the beans or components in XML bean configuration file, so that Spring container can detect and register your beans or compon... 阅读全文
posted @ 2015-08-22 11:04 wuhn 阅读(236) 评论(0) 推荐(0)
摘要:Spring expression language (SpEL) supports many functionality, and you can test those expression features with this special “`ExpressionParser`” inter... 阅读全文
posted @ 2015-08-22 10:54 wuhn 阅读(355) 评论(0) 推荐(0)
摘要:Spring EL supports regular expression using a simple keyword “`matches`“, which is really awesome! For examples,``` @Value("#{'100' matches '\\d+' }")... 阅读全文
posted @ 2015-08-22 09:40 wuhn 阅读(154) 评论(0) 推荐(0)
摘要:In this article, we show you how to use Spring EL to get value from `Map` and `List`. Actually, the way of SpEL works with `Map` and `List` is exactly... 阅读全文
posted @ 2015-08-22 09:36 wuhn 阅读(188) 评论(0) 推荐(0)
摘要:Spring EL supports ternary operator , perform “if then else” conditional checking. For example,```condition ? true : false```##Spring EL in Annotation... 阅读全文
posted @ 2015-08-22 09:33 wuhn 阅读(218) 评论(0) 推荐(0)
摘要:Spring EL supports most of the standard mathematical, logical or relational operators. For example,- Relational operators – equal (`==`, `eq`), not eq... 阅读全文
posted @ 2015-08-22 09:30 wuhn 阅读(168) 评论(0) 推荐(0)
摘要:In Spring EL, you can reference a bean, and nested properties using a ‘dot (`.`)‘ symbol. For example, “`bean.property_name`“.```public class Customer... 阅读全文
posted @ 2015-08-22 09:20 wuhn 阅读(181) 评论(0) 推荐(0)
摘要:The Spring EL is similar with OGNL and JSF EL, and evaluated or executed during the bean creation time. In addition, all Spring expressions are availa... 阅读全文
posted @ 2015-08-21 20:30 wuhn 阅读(200) 评论(0) 推荐(0)
摘要:In Spring, you can either implements `InitializingBean` and `DisposableBean` interface or specify the `init-method` and `destroy-method` in bean confi... 阅读全文
posted @ 2015-08-21 19:36 wuhn 阅读(362) 评论(0) 推荐(0)
摘要:In Spring, you can use `init-method` and `destroy-method` as attribute in bean configuration file for bean to perform certain actions upon initializat... 阅读全文
posted @ 2015-08-21 17:01 wuhn 阅读(198) 评论(0) 推荐(0)
摘要:In Spring, `InitializingBean` and `DisposableBean` are two marker interfaces, a useful way for Spring to perform certain actions upon bean initializat... 阅读全文
posted @ 2015-08-21 16:58 wuhn 阅读(207) 评论(0) 推荐(0)
摘要:The `@Required` annotation is used to make sure a particular property has been set. If you are migrate your existing project to Spring framework or ha... 阅读全文
posted @ 2015-08-21 16:50 wuhn 阅读(224) 评论(0) 推荐(0)
摘要:Spring’s dependency checking in bean configuration file is used to make sure all properties of a certain types (primitive, collection or object) have ... 阅读全文
posted @ 2015-08-21 16:25 wuhn 阅读(209) 评论(0) 推荐(0)
摘要:In Spring,you can use dependency checking feature to make sure the required properties have been set or injected.##Dependency checking modes4 dependen... 阅读全文
posted @ 2015-08-21 16:21 wuhn 阅读(315) 评论(0) 推荐(0)
摘要:In Spring, the inheritance is supported in bean configuration for a bean to share common values, properties or configurations.A child bean or inherite... 阅读全文
posted @ 2015-08-21 16:13 wuhn 阅读(285) 评论(0) 推荐(0)