hk2000c技术专栏

技术源于哲学,哲学来源于生活 关心生活,关注健康,关心他人

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  111 随笔 :: 1 文章 :: 28 评论 :: 0 Trackbacks

#

spring 事务支持,需要事务支持。

posted @ 2007-11-01 00:41 hk2000c 阅读(240) | 评论 (0)编辑 收藏

xxAction继承BaseAction,BaseAction注入了一个CommonManager,BaseAction.commonSave()方法调用了commonManager。

本来想xxAction调用父类的commonSave方法将会导致commonManager为null的错误,因为jvm去初始化BaseAction时并不会去注入CommonManger。
其实解决这个问题只需要在子类xxAction bean配置文件中加上commonManager这个property,然后把父类BaseAction的commonManager 改为protected就 Ok了。这样初始化子类的时候会注入commonManager,调用commonSave方法也就不会抛出npe了。

配置文件中把xxAction 加上parent的配置也是可以的,这样会把父类的所有property都注入

posted @ 2007-10-31 16:32 hk2000c 阅读(1994) | 评论 (0)编辑 收藏


增加CMS static page 预读功能

posted @ 2007-10-31 00:22 hk2000c 阅读(219) | 评论 (0)编辑 收藏

用户密码使用动态密钥SHA-512位加密

posted @ 2007-10-30 14:17 hk2000c 阅读(751) | 评论 (0)编辑 收藏

系统会给出step by step 的配置表单

配置比如 密码密钥 等 关键数据


posted @ 2007-10-30 13:29 hk2000c 阅读(214) | 评论 (0)编辑 收藏

增加系统配置文件

在 StartupListener 内 
 
每次重启读取

posted @ 2007-10-30 13:23 hk2000c 阅读(196) | 评论 (0)编辑 收藏


支持动态读取系统配置的url列表,标记为 static , 权限可配置
 
放在 StartupListener 内。
 
做到每次系统重启都自动更新,有校验匹配的功能。

posted @ 2007-10-30 13:22 hk2000c 阅读(264) | 评论 (0)编辑 收藏

增加用户名即时校验机制,可以即时查询用户名是否被占用。

posted @ 2007-10-29 16:00 hk2000c 阅读(212) | 评论 (0)编辑 收藏

javax.servlet.http.Cookie

JSESSIONID = 当前session 号码

org/apache/coyote/Request.java

基本封装类,包括基本request 信息

其源代码在此可以查看 http://www.docjar.com/html/api/org/apache/coyote/Request.java.html

 public Request() {
72 
73          parameters.setQuery(queryMB);
74          parameters.setURLDecoder(urlDecoder);
75          parameters.setHeaders(headers);
76 
77          methodMB.setString("GET");
78          uriMB.setString("/");
79          queryMB.setString("");
80          protoMB.setString("HTTP/1.0");
81 
82      }
83 

开始初始化

回收
 // -------------------- Recycling --------------------
459
460
461     public void recycle() {
462         bytesRead=0;
463
464         contentLength = -1;
465         contentTypeMB = null;
466         charEncoding = null;
467         headers.recycle();
468         serverNameMB.recycle();
469         serverPort=-1;
470         localPort = -1;
471         remotePort = -1;
472
473         cookies.recycle();
474         parameters.recycle();
475
476         unparsedURIMB.recycle();
477         uriMB.recycle();
478         decodedUriMB.recycle();
479         queryMB.recycle();
480         methodMB.recycle();
481         protoMB.recycle();
482         //remoteAddrMB.recycle();
483         //remoteHostMB.recycle();
484
485         // XXX Do we need such defaults ?
486         schemeMB.recycle();
487         methodMB.setString("GET");
488         uriMB.setString("/");
489         queryMB.setString("");
490         protoMB.setString("HTTP/1.0");
491         //remoteAddrMB.setString("127.0.0.1");
492         //remoteHostMB.setString("localhost");
493
494         instanceId.recycle();
495         remoteUser.recycle();
496         authType.recycle();
497         attributes.clear();
498     }

伟大的method() 方法


 public MessageBytes method() {
184         return methodMB;
185     }
186     

  getMethod() 方法就是从这里搞来的。

还有 org.apache.tomcat.util.http.MimeHeader 存放了所有的Header 信息


=== MimeHeaders ===
accept = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
referer = http://localhost/user/userRegister.html
accept-language = zh-CN,en-US;q=0.5
content-type = application/x-www-form-urlencoded
ua-cpu = x86
accept-encoding = gzip, deflate
user-agent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; MAXTHON 2.0)
host = localhost
content-length = 70
connection = Keep-Alive
cache-control = no-cache
cookie = JSESSIONID=06820B9CA579BF64CC89C5E041864459







posted @ 2007-10-27 19:52 hk2000c 阅读(5725) | 评论 (0)编辑 收藏

完成了灵活表单开发。

加紧开发用户权限,修正用户列表,用户编辑,用户添加,数据库支持。

开发好以后就可以全面开发CMS系统了。




posted @ 2007-10-27 17:29 hk2000c 阅读(175) | 评论 (0)编辑 收藏

仅列出标题
共11页: First 上一页 2 3 4 5 6 7 8 9 10 下一页 Last