- 博客(19)
- 收藏
- 关注
原创 Java获取web绝对路径的问题
[code="java"]ServletActionContext.getServletContext().getRealPath("")[/code]D:\Java\Tomcat\apache-tomcat-6.0.33\webapps\weibo[code="java"]ServletActionContext .getServletContext()....
2012-01-31 15:35:10 85
原创 Java写入文件到web根目录的配置文件里
[code="java"]/** * */package com.ape.weibo.basedata.utils;import java.io.BufferedWriter;import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStreamWriter;...
2012-01-31 14:50:18 733
原创 sql更新数据不能有from的错误解决方案
[code="sql"]You can't specify target table 'tbl_total_log' for update in FROM clause[/code][code="sql"]update tbl_total_log set unassigned = unassigned - 199 where id = (select id from (sele...
2012-01-31 13:43:36 321
原创 Jsp传递checkbox的值并做判断
[code="jsp"][/code][code="java"]public List retrieve(WeiboFeeds feeds) { List list = new ArrayList(); String[] strEqlArr = joinEql(feeds);[/code]
2012-01-31 10:44:40 330
原创 Java汇总List数据
[code="java"]list = totallogService.retrieve(); if (list.size() > 0) { totallog = new Totallog(); int handled = 0; int reported = 0; int unassigned = 0; int untreated = 0; ...
2012-01-16 11:51:48 635
原创 Java合并数组List
[code="java"]List list = totallogDao.listNamedQuery("RETRIEVE_TOTALLOG", null); List list2 = totallogDao.listNamedQuery("RETRIEVE_TOTALLOG_SUM", null); list.addAll(list2); return list;[/c...
2012-01-16 11:50:47 308
原创 巧妙的在动态生成多条数据时勾选checkbox和radio
struts标签[code="jsp"][/code]struts标签2[code="jsp"] 正负面: ...
2012-01-13 10:05:47 422
原创 jquery获取radio,select,checkbox的值-精简版
// 循环获取radio的值[code="js"]var level_important = 0; var list = $("input[type='radio'][name='" + ("radio_level_important_" + id) + "']"); list.each(function() { if ($(this).attr('checked...
2012-01-11 10:41:51 76
原创 jquery循环获取每个表格的ID
[code="jsp"] [/code][code="js"]var value2; $(".row_id").each(function() { // $(".row_id").length value2 += $(this).val() + ","; ...
2012-01-10 11:52:16 383
原创 mysql 修改默认编码
[code="windows"]在mysql安装目录下my.ini下添加[mysqld]default-character-set=utf8[/code][code="linux"]在/etc/my.cnf下添加[mysqld]default-character-set=utf8[/code][color=red]但是以dos方式登陆数据库,se...
2012-01-05 11:56:24 100
原创 Js Built-in Functions
[code="html"]Method DescriptioncharAt() Returns the character at the specified index.concat() Combines the text of two strings and returns a new string.forEach() Calls a function for each elem...
2012-01-05 11:37:07 196
原创 Struts FreeMaker result type
[code="xml"]In this example we are going to see how we can use FreeMaker as the view technology. Freemaker is a popular templating engine that is used to generate output using predefined templates. ...
2012-01-05 11:36:57 69
原创 MySQL String Functions
[code="sql"]Name DescriptionASCII() Return numeric value of left-most characterBIN() Return a string representation of the argumentBIT_LENGTH() Return length of argument in bitsCHAR_LENGTH()...
2012-01-05 11:36:46 202
原创 MySQL Numeric Functions
[code="sql"]Name DescriptionABS() Returns the absolute value of numeric expression.ACOS() Returns the arccosine of numeric expression. Returns NULL if the value is not in the range -1 to 1.ASI...
2012-01-05 11:36:23 514
原创 Struts2 Framework Interceptors
[code="java"]Maps exceptions that are thrown from an action to a result, allowing automatic exception handling via redirection.8 fileUploadFacilitates easy file uploading.9 i18nKeeps track...
2012-01-04 14:47:42 107
原创 Struts 2 File Uploads
Create view files:Let us start with creating our view which will be required to browse and upload a selected file. So let us create a index.jsp with plain HTML upload form that allows the user to ...
2012-01-04 14:47:26 123
原创 Struts result配置多个值传递
[code="xml"]1、Action配置的各项默认值 (1)、如果没有为action指定class,默认是ActionSupport。 (2)、如果没有为action指定method,默认执行action中的execute()方法。 (3)、如果没有为action指定result,默认值为success。 2、result配置的各种试图转发类型 ...
2012-01-04 14:46:39 126
原创 Struts result param详细设置
[code="xml"] dataMap true userList.* SUCCESS [/code][code="xml"] /content/news/index.jsp ...
2012-01-04 14:43:07 217
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人