Java web
文章平均质量分 62
South__wind
ACMER
展开
-
struts result
package com.icss.daos;import java.sql.Connection;import java.sql.SQLException;import org.apache.commons.dbutils.DbUtils;import org.apache.commons.dbutils.QueryRunner;public class Custo原创 2014-11-12 14:35:56 · 492 阅读 · 0 评论 -
result type
Action中result的各种转发类型1,dispatcher:默认值 ,内部定向/WEB-INF/page/employeeAdd.jsp2,redirect:浏览器重定向/index.jsp3, redirectAction 重定向到action//同一个包下的actionname //不同包下的XXXXXX原创 2014-11-16 10:40:26 · 518 阅读 · 0 评论 -
@resourse的使用
在java代码中使用@Autowired或@Resource注解方式进行装配,这两个注解的区别是:@Autowired 默认按类型装配,@Resource默认按名称装配,当找不到与名称匹配的bean才会按类型装配。 @Autowired private PersonDao personDao;//用于字段上 @Autowired public void s原创 2014-11-22 14:00:19 · 3166 阅读 · 0 评论 -
Struts入门
struts_t1.xml: struts.xml /login.jsp /index.jsp /error.jsp web.xml<web-app version="2.5" xmlns="http://java.sun.com/xml/原创 2014-11-07 13:36:06 · 466 阅读 · 0 评论 -
dpcp
在spring中配置dbcp:beans.xml:class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">classpath:jdbc.propertiesclass="org.apache.commons.dbcp.BasicDataSource">原创 2014-12-02 10:22:53 · 1198 阅读 · 0 评论 -
使用Dom4j解析和创建XML文件
参考文章:http://www.blogjava.net/i369/articles/154264.htmlimport java.io.File;import java.io.FileWriter;import java.util.Iterator;import java.util.List;import org.dom4j.Attribute;//需要导入dom原创 2015-02-17 14:32:17 · 631 阅读 · 0 评论 -
Ajax使用范例
参考:http://wandering192.iteye.com/blog/736136index.jsp:String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort原创 2015-02-19 14:32:16 · 503 阅读 · 0 评论