- 浏览: 157646 次
- 性别:
- 来自: 深圳
最新评论
-
acang84n:
难得是2.3的版本注解方式不一样!?
Struts2 注解配置 demo2 -
acang84n:
为什么用struts2-convention-plugin-2 ...
Struts2 注解配置 demo2 -
taney_911:
这个正则表达式也太长了把。。。
Java中正则表达式验证日期格式 -
iamaj2eeprogrammer:
非常感谢你给出的例子!
Struts2 注解配置 demo2 -
superran_sy:
害人。。。
8888-88-88
居然也格式正确
Java中正则表达式验证日期格式
文章列表
jsp页面中 用click事件调用js 此时的页面编码要用UTF-8
<script language="javascript">
location.href=encodeURI(encodeURI("test.do?para=测试");
<script >
在jsp页面中还可以用
<a href="test.do?para=<%=java.net.URLEncoder.encode("测试","UTF-8")%>">测试</a>
Se ...
- 2009-02-21 16:52
- 浏览 4948
- 评论(1)
建立Test WEB工程
prototype.js 位置 WebContent/js/prototype.js
创建test2.jsp 位置 WebContent/test/test2.jsp
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" &qu ...
- 2009-02-18 14:03
- 浏览 1667
- 评论(0)
转载http://hi.baidu.com/axhack/blog/item/0e8b4c589d495f84810a1861.html
下载
svn-1.4.0-setup.exe(服务器)
http://subversion.tigris.org/files/documents/15/34093/svn-1.4.0-setup.exe
TortoiseSVN-1.4.3.8645-win32-svn-1.4.3.msi(客户端)
http://julupanter-informatica-grafica.googlecode.com/files/TortoiseSVN-1.4.3.8 ...
- 2009-02-09 11:12
- 浏览 1245
- 评论(0)
oracle 任务定时执行
在oracle可以像sql server那样建立定时任务.
下面我使用oracle sql创建一个定时任务.
1.创建一个简单的表.
create table testdate
(
name varchar2(20),
createdate date
)
2.创建一个存储过程.
create procedure Proc_addTestdate
as
begin
insert into testdate values('abc',SYSDATE);
end;
3.创建任务
DECLARE
X NUMBER;
BE ...
- 2009-02-02 09:12
- 浏览 1595
- 评论(0)
在server.xml文件当中加入如下配置即可
<Context path="/newtest"
docBase="${catalina.home}/webapps/oldtest"
debug="5"
reloadable="false"
crossContext="true">
<Resource name="jdbc/test"
...
- 2009-01-09 16:12
- 浏览 2988
- 评论(0)
读cookie
//读取cookie
String loginType = "";
String strgrouploginid = "";
String strloginid = "";
Cookie[] cookies = request.getCookies();
if(cookies!=null)
{
for (int i = 0; i < cookies.length; i++ )
{
Cookie c = cookies[i];
...
- 2009-01-06 16:54
- 浏览 1863
- 评论(0)
//日期格式判断
function IsValidDate(dateStr)
{
var reg = /^((\d{2}(([02468][048])|([13579][26]))[\-\/\s]?((((0?[13578])|(1[02]))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\-\/\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\-\/\s]?((0?[1-9])|([1-2][0-9])))))|(\d{2}(([02468][1235679])| ...
- 2008-12-22 16:46
- 浏览 1480
- 评论(0)
1。使用Java.util.Properties类的load()方法
示例:InputStreamin=lnewBufferedInputStream(newFileInputStream(name));
Propertiesp=newProperties();
p.load(in);
2。使用java.util.ResourceBundle类的getBundle()方法
示例:ResourceBundlerb=ResourceBundle.getBundle(name,Locale.getDefault());
3。使用java.util.PropertyResourceBundl ...
- 2008-12-17 12:32
- 浏览 982
- 评论(0)
我用的administrator用户登录,在安装oracle 9i时出现如下错误提示:
this directory is writable and has atleast 32 MB of disk space
在网上查到说要改变环境变量,设置路径。弄了许久也没有解决。最后发现,原来是卖咖啡的原因,关掉杀毒软件就能顺利安装进去了。
- 2008-12-17 11:17
- 浏览 823
- 评论(0)
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
*@author沈东良shendl_s@hotmail.com
*Nov29,2006 10:34:34AM ...
- 2008-12-12 09:51
- 浏览 1278
- 评论(0)
public static void main(String[] args)
{
String temp = "<p><img height=\"600\" width=\"800\" alt=\"\" sRc=\"/adc_op/UserFiles/Image/Sunset.jpg\" /></p>"
+"<p><ImG height=\"600\" wi ...
- 2008-12-11 20:06
- 浏览 1137
- 评论(0)
参看 http://smallfish.iteye.com/blog/198354 学习 谢谢smallfish
# Set log levels #
log4j.rootLogger = DEBUG, Console, LogFile, ErrorFile
# Output the log info to the Java Console #
log4j.appender.Console = org.apache.log4j.ConsoleAppender
log4j.appender.Console.Target = System.out
log4j.appender ...
- 2008-12-08 16:18
- 浏览 3674
- 评论(0)
如果为jboss则注意要引用jbossall-client.jar包 javax.naming.InitialContext initialContext 要引用
environment.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
environment.put(Context.PROVIDER_URL, "127.0.0.1:1099");
javax.naming ...
- 2008-12-02 08:44
- 浏览 1026
- 评论(0)
读取test.properties资源文件
import java.util.ResourceBundle;
public class Config
{
/**
* 读到test.properties配置文件
*/
public static String getConfig(String key)
{
ResourceBundle bundle = ResourceBundle.getBundle("test");
String value = bundle.getString(key);
return value;
...
- 2008-12-02 08:34
- 浏览 1084
- 评论(0)
今天打开Eclipse时,发现原来有的一些功能不见了,当我写好程序要部署到Tomcat时,发现Server没有了,前几天还好好的,在网上找了好大一会,都没有找到什么结论,原来是我前几天改一个老项目时,用了一个低版本的Eclipse和jdk,把java_home改成低版本的了,把java_home改成原来的高版本,这时高版本的eclipse也可以用了。因为我只做了这个修改,所以以后大家如果遇到同样的问题不防也试试这个方法。
- 2008-11-25 18:50
- 浏览 2470
- 评论(0)