摘要: spring 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:aop="http://www.springframework.org/schema/aop" xmln 阅读全文
posted @ 2012-06-06 10:13 断肠夕阳丿 阅读(366) 评论(0) 推荐(0)
摘要: struts2所必须的jar包:struts2-core-2.1.6.jar --------------- struts2的核心包freemarker-2.3.13.jar--------------- FreeMarker是一个模板引擎,一个基于模板生成文本输出的通用工具commons-logging.jar ----------- Jakarta的通用日志记录包ognl-2.6.11.jar -------------- 支持ognl表达式xwork-2.1.2.jar -------------- xwork的包 由于Struts2是由xwork的延伸 有些类依然关联着 xwo... 阅读全文
posted @ 2012-06-05 13:05 断肠夕阳丿 阅读(184) 评论(0) 推荐(0)
摘要: spring配置文件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" xmlns:t 阅读全文
posted @ 2012-06-04 19:52 断肠夕阳丿 阅读(424) 评论(0) 推荐(0)
摘要: spring配置文件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:sche 阅读全文
posted @ 2012-06-04 12:55 断肠夕阳丿 阅读(933) 评论(0) 推荐(0)
摘要: spring的数据源配置:<!--DataSource--> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="url" value="jdbc:sqlserver://localhost:1433;databaseName=svse"></property> <proper 阅读全文
posted @ 2012-06-02 10:03 断肠夕阳丿 阅读(195) 评论(0) 推荐(0)
摘要: 会话bean很简单,在接口类声明其为本地的还是远程的怎么分别是@Local(本地),@Remote(远程)实现接口类时声明其为有状态的还是无状态的声明分别是@Stateless(无状态),@Stateful(有状态)调用会话bean时导出其要使用的借口,打成jar包,导入要操作ejb工程的工程中在其工程中新建工具类,代码如下:public static Context getContext() { // 配置应用上下文的环境 Context ctx = null; Properties pro = new Properties(); pr... 阅读全文
posted @ 2012-05-30 10:49 断肠夕阳丿 阅读(158) 评论(0) 推荐(0)
摘要: 一 点对点发送消息:首先配置文件XX_service.xml放到 到jboss-4.2.2.GA\server\default\deploy中配置代码如下:<server> <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=xiaoyi"> <attribute name="JNDIName">queue/xiaoyi</attribute> <depe 阅读全文
posted @ 2012-05-30 10:09 断肠夕阳丿 阅读(325) 评论(0) 推荐(0)
摘要: 通过JNDI Api 的方式访问数据源,在tomcat 下的conf/context.xml中配置如下代码:<Resource name="sqlconn" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" //连接oracle的驱动 url="jdbc:oracle:thin:@localhost:1521:orcl" //连接oracle的地址 u 阅读全文
posted @ 2012-05-28 09:16 断肠夕阳丿 阅读(362) 评论(0) 推荐(0)
摘要: 首先又打开android网络权限在androidManifest.x ml中:<uses-permission android:name="android.permission.INTERNEt"/>//javaee工程访问地址String url = "http://localhost:8080/TestAndroid";//把要请求的值封装到namevalupair的集合中NameValuePair nameValuePair1 = new BasicNameValuePair("name","zhangsn 阅读全文
posted @ 2012-05-26 08:35 断肠夕阳丿 阅读(346) 评论(0) 推荐(0)
摘要: 首先生成一个请求对象String url = "www.baidu.com";//设置url访问路径HttpGet httpGet = new HttpGet(url);//生成一个http客户端对象HttpClient httpclient = new DefaultHttpClient();InputStream inputStream = null;try{//使用http客户端发送请求对象//客户端请求后,服务器端响应的结果HttpResponse httpRespose = httpCient.execute(httpGet);//httpEntity取出Resp 阅读全文
posted @ 2012-05-26 08:14 断肠夕阳丿 阅读(299) 评论(0) 推荐(0)