`
jadewoo
  • 浏览: 85370 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
applicationContext.xml的配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:sch ...
/** * 2010-7-6 上午11:47:21 */ package com.wichina.test; import java.util.Date; import java.util.List; import junit.framework.TestCase; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.wichina.dao.BookDAO; ...
servlet.getServletContext().getRealPath("/")
假如局域网内有两台机A和B,要求是把A机admin文件的复制到B机上。命令是 scp -rp A机用户名@A机局域网址(IP地址):A机被复制的文件全路径 B机的文件全路径("."表示当前路径下,即你可以在B机上先进入要复制的目录,然后再执行改命令) 如: scp -rp animation@172.169.1.63:/usr/super/app/webapps/admin . 或者 scp -rp animation@172.169.1.63:/usr/super/app/webapps/cms /usr/super/app/webapps 然后提示输入密码,接着输入B机 ...
public List getRandResult(final String hql, final Object[] values,final int len){ List list = getHibernateTemplate().executeFind(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query query = session.createQuery(hq ...
public class RandomNum { /** * 产生随机不重复的随机整数数组,产生len个从shart到end的随机数,包括shart和end * @param len 表示数字个是,即要生成多少个整数 * @param start 开始的数字 * @param end 结束的数字 * @return */ public static int[] getNotRepRandomNumArr(int len, int start, int end){ int[] ids = new int[len]; int j = 0; for (int ...
同一台服务器上一个resin配置多个应用,每个应用的启动独立。 resin.conf <!--    - Resin 3.1 configuration file.   --> <resin xmlns="http://caucho.com/ns/resin"        xmlns:resin="http://caucho.com/ns/resin/core">   <!-- adds all .jar files under the resin/lib directory -->   <class-load ...
最近开发一个项目,技术架构由spring2+hibernate3+struts2+freemarker搭建。struts2的action视图转发工作,本人觉得用注解直接在代码上配置很方便,想省去了配置struts.xml操作。但就是由于自己懒惰,在开发过程中遇到了一些麻烦,因为对struts2注解的不熟悉,不知道怎样做拦截器的注解,后来经过在网上查资料和自己不断的搞测试,终于把问题搞定了。 下面是我写的一个个简单测试例子: //struts.xml <struts> <include file="struts-default.xml" /> <p ...
一、freemarker判断list为空的办法有如下几种: <#list xxList as itme> 1、<#if itme[0]?exists> 2、<#if itme?has_content> 3、<#if itme[0]??> 二、截取字符串长度: 有的时候我们在页面中不需要显示那么长的字符串,比如新闻标题 ...
代码如下: import java.util.List; import junit.framework.TestCase; import org.springframework.context.ApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext; public class Test  extends TestCase { private ApplicationContext context = null; @Override protec ...
Global site tag (gtag.js) - Google Analytics