上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 35 下一页
摘要: 1.创建javabean的类,只需有私有成员和get/set方法Person.java代码:package com.BeanJsp.jsp.bean;public class Person { private String name; private int uid; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getUid() { retur... 阅读全文
posted @ 2013-11-28 18:17 行云有影 阅读(290) 评论(0) 推荐(0)
摘要: 1、package com.server.utils;import java.io.File;public class fileclear { /** * 删除单个文件 * @param sPath 被删除文件的文件名 * @return 单个文件删除成功返回true,否则返回false */ public boolean deleteFile(String sPath) { boolean flag = false; File file = new File(sPath); // 路径为文件且不... 阅读全文
posted @ 2013-11-22 16:37 行云有影 阅读(202) 评论(0) 推荐(0)
摘要: 123Done! 阅读全文
posted @ 2013-11-20 14:02 行云有影 阅读(135) 评论(0) 推荐(0)
摘要: 1.文件路径:/res/values/colors.xml2.添加颜色 #660000003.使用颜色:3.1xml使用:@color/dark3.2代码使用tv.setTextColor(getResources().getColor(R.color.dark));Done! 阅读全文
posted @ 2013-11-20 14:01 行云有影 阅读(172) 评论(0) 推荐(0)
摘要: 1、访问ActionContext资源request,session,parameters(1)、action实现ServletRequestAware接口,并且重写setServletRequest()// request对象,不用设置get方法,只须重写set方法 private HttpServletRequest request; @Override public String execute() throws Exception { // TODO Auto-generated method stub........... request.se... 阅读全文
posted @ 2013-11-19 19:41 行云有影 阅读(501) 评论(0) 推荐(0)
摘要: 1、jsp添加action1.1 URL执行action">书籍列表1.2 Form执行action 2 Action代码Action代码:package com.test.action;import java.util.ArrayList;import java.util.List;import com.test.bean.Book;public class BookAction {public String listBook() { return "list"; }}3.struts.xml配置3.13.1.1 method制定方法“lis... 阅读全文
posted @ 2013-11-19 13:45 行云有影 阅读(661) 评论(0) 推荐(0)
摘要: 1.在WEB-INF/lib加上10个lib包commons-fileupload-1.3.jarcommons-io-2.0.1.jarcommons-lang-2.4.jarcommons-lang3-3.1.jarcommons-logging-1.1.3.jarfreemarker-2.3.19.jarjavassist-3.11.0.GA.jarognl-3.0.6.jarstruts2-core-2.3.15.3.jarxwork-core-2.3.15.3.jar2.在/src文件夹下创建struts.xml3.在web.xml配置触发器 s... 阅读全文
posted @ 2013-11-18 22:10 行云有影 阅读(221) 评论(0) 推荐(0)
摘要: 1、添加权限: 2、判断网络是否可用: private ConnectivityManager manager; private BroadcastReceiver receiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub // 通知用户网络连接变化 NetworkInfo ... 阅读全文
posted @ 2013-11-16 17:32 行云有影 阅读(298) 评论(0) 推荐(0)
摘要: 1.activity监听滑动(只对空白部分监听左右滑动,对组件例如ListView无效)package com.example.movetest;import android.app.Activity;import android.os.Bundle;import android.util.Log;import android.view.GestureDetector;import android.view.MotionEvent;public class MainActivity extends Activity { private GestureDetector mGestureDe... 阅读全文
posted @ 2013-11-16 12:22 行云有影 阅读(1656) 评论(0) 推荐(0)
摘要: Done! 阅读全文
posted @ 2013-11-12 17:25 行云有影 阅读(389) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 35 下一页