2006年4月19日

 

1 < composite - id name = " comp_id " class = " com.xuanwu.wap.king.model.persistence.TblKingUserAgaPK "  unsaved - value = " null " >
2              < key - many - to - one name = " user "  column = " N_USER_ID "   class = " com.xuanwu.wap.king.model.persistence.TblKingUser " >
3              </ key - many - to - one >
4              < key - many - to - one name = " aga "  column = " N_AgA_ID "   class = " com.xuanwu.wap.king.model.persistence.TblKingAga " >
5              </ key - many - to - one >                     
6          </ composite - id >

1 < many-to-one  name ="tblKingAga"  class ="com.xuanwu.wap.king.model.persistence.TblKingAga"  update ="false"  insert ="false" >
2              < column  name ="N_AGA_ID"   />
3 </ many-to-one >

1 < set  name ="tblKingUserAgas"  lazy ="true"  inverse ="true"  cascade ="none" >
2              < key >
3                  < column  name ="N_AGA_ID"   />
4              </ key >
5              < one-to-many  class ="com.xuanwu.wap.king.model.persistence.TblKingUserAga"   />
6 </ set >

1 < id  name ="id"  type ="java.lang.Long"  column ="id" >
2        < generator  class ="sequence" >
3          < param  name ="sequence" > seq_user_id </ param >
4        </ generator >
5 </ id >

 1 < one-to-one  name ="userData"  class ="com.xuanwu.wap.union.journey.data.model.TJourneyUserData"  cascade ="all"  property-ref ="user" />
 2 < many-to-one  name ="roleData"  cascade ="none"  class ="com.xuanwu.wap.union.journey.data.model.TJourneyRoleData"  column ="roleid" />
 3 < set  name ="userNPC"  cascade ="all"  inverse ="true"  lazy ="true" >
 4           < key  column ="userid" ></ key >
 5           < one-to-many  class ="com.xuanwu.wap.union.journey.data.model.TJourneyUserNpc"   />
 6 </ set >
 7 < set  name ="userGoods"  cascade ="all"  inverse ="true"  lazy ="true" >
 8           < key  column ="userid" ></ key >
 9           < one-to-many  class ="com.xuanwu.wap.union.journey.data.model.TJourneyUserGood"   />
10 </ set >

posted @ 2006-04-19 17:07 爱你.福利 阅读(338) | 评论 (0)编辑 收藏
 
路径与域合在一起就构成了cookie的作用范围。
如果不设置过期时间,则表示这个cookie的生命期为浏览器会话期间,只要关闭浏览器窗口,cookie就消失了。这种生命期为浏览器会话期的cookie被称为会话cookie。会话cookie一般不存储在硬盘上而是保存在内存里,当然这种行为并不是规范规定的。
存储在硬盘上的cookie可以在不同的浏览器进程间共享,比如两个IE窗口。而对于保存在内存里的cookie,不同的浏览器有不同的处理方式。对于IE,在一个打开的窗口上按Ctrl-N(或者从文件菜单)打开的窗口可以与原窗口共享,而使用其他方式新开的IE进程则不能共享已经打开的窗口的内存cookie;对于Mozilla Firefox0.8,所有的进程和标签页都可以共享同样的cookie。一般来说是用javascript的window.open打开的窗口会与原窗口共享内存cookie。浏览器对于会话cookie的这种只认cookie不认人的处理方式经常给采用session机制的web应用程序开发者造成很大的困扰。
posted @ 2006-04-19 16:49 爱你.福利 阅读(214) | 评论 (0)编辑 收藏
 

Spring配置属性名:contextConfigLocation相对Web应用根目录

log4jConfigLocation
Convenience class that performs custom Log4J initialization for web environments, allowing for log file paths within the web application, with the option to perform automatic refresh checks (for runtime changes in logging configuration).

WARNING: Assumes an expanded WAR file, both for loading the configuration file and for writing the log files. If you want to keep your WAR unexpanded or don't need application-specific log files within the WAR directory, don't use Log4J setup within the application (thus, don't use Log4jConfigListener or Log4jConfigServlet). Instead, use a global, VM-wide Log4J setup (for example, in JBoss) or JDK 1.4's java.util.logging (which is global too).

Supports three init parameters at the servlet context level (that is, context-param entries in web.xml):

"log4jConfigLocation":
Location of the Log4J config file; either a "classpath:" location (e.g. "classpath:myLog4j.properties"), an absolute file URL (e.g. "file:C:/log4j.properties), or a plain path relative to the web application root directory (e.g. "/WEB-INF/log4j.properties"). If not specified, default Log4J initialization will apply ("log4j.properties" in the class path; see Log4J documentation for details).
"log4jRefreshInterval":
Interval between config file refresh checks, in milliseconds. If not specified, no refresh checks will happen, which avoids starting Log4J's watchdog thread.
"log4jExposeWebAppRoot":
Whether the web app root system property should be exposed, allowing for log file paths relative to the web application root directory. Default is "true"; specify "false" to suppress expose of the web app root system property. See below for details on how to use this system property in log file locations.
Note: initLogging should be called before any other Spring activity (when using Log4J), for proper initialization before any Spring logging attempts.

Log4J's watchdog thread will asynchronously check whether the timestamp of the config file has changed, using the given interval between checks. A refresh interval of 1000 milliseconds (one second), which allows to do on-demand log level changes with immediate effect, is not unfeasible.

WARNING: Log4J's watchdog thread does not terminate until VM shutdown; in particular, it does not terminate on LogManager shutdown. Therefore, it is recommended to not use config file refreshing in a production J2EE environment; the watchdog thread would not stop on application shutdown there.

By default, this configurer automatically sets the web app root system property, for "${key}" substitutions within log file locations in the Log4J config file, allowing for log file paths relative to the web application root directory. The default system property key is "webapp.root", to be used in a Log4J config file like as follows:

log4j.appender.myfile.File=${webapp.root}/WEB-INF/demo.log

Alternatively, specify a unique context-param "webAppRootKey" per web application. For example, with "webAppRootKey = "demo.root":

log4j.appender.myfile.File=${demo.root}/WEB-INF/demo.log

WARNING: Some containers (like Tomcat) do not keep system properties separate per web app. You have to use unique "webAppRootKey" context-params per web app then, to avoid clashes. Other containers like Resin do isolate each web app's system properties: Here you can use the default key (i.e. no "webAppRootKey" context-param at all) without worrying.

posted @ 2006-04-19 16:46 爱你.福利 阅读(847) | 评论 (0)编辑 收藏
 

WML规范:
img标签必须有src和alt两个属性
 HTML特殊字符必须过滤
 所有的内容必须包括在<p></p>标签中
 <p>不能嵌套
 input标签不能嵌套在<small>中
中文的解决:
中国移动加入以下几句后,页面中可以直接写中文,不用转换,提交的中文直接request.getParameter("")获得,不用转换
<%@ page contentType="text/vnd.wap.wml;charset=gbk"%>
<%response.setContentType("text/vnd.wap.wml;charset=UTF-8");%>
<%request.setCharacterEncoding("UTF-8");%>
中国联通加入以下几句后,页面中可以直接写中文,不用转换,提交的中文直接request.getParameter("")获得,不用转换
<%@ page contentType="text/vnd.wap.wml;charset=gbk"%>
<%request.setCharacterEncoding("UTF-8");%>
操作系统win2000,Web Server resin(或tomcat)
因为编码为UTF-8,在Linux应该也没问题
联通x-wap-client-id,有就是2.0的,没有就是1.2
联通下载业务比较麻烦,需要申请DownloadFun
uplink:download?source=http://wap.165e.com/df/http://www.139130.net/mkj/05000028.mid&amp;size=11311&amp;object=phone:ringtone&amp;status=http://wap.139130.net/mkj/result.jsp这个下载链接的格式
http://wap.165e.com/df/为代理地址,后面的是文件地址
object根据不同的文件格式不一样
phone:ringtone表示铃声
phone:wallpaper表示图片

联通的伪手机号:req.getHeader("deviceid")//211.96.20.4*
联通的手机号:req.getHeader("x-up-calling-line-id")
移动的伪手机号:req.getParameter("MISC_MID")//211.136.253.102

posted @ 2006-04-19 16:43 爱你.福利 阅读(433) | 评论 (0)编辑 收藏
 
usr_tab_columns保存了所有用户的表的列的信息,包括数据类型,列名,表名等
属于SYS用户,其它用户默认只有Select的权限,表结构看下图
r_user_tab_columns.BMP
图不清晰,请看相册中图片
例:查找所有的包含CreateDate列名的表名
select table_name from user_tab_columns where column_name='CreateDate'
posted @ 2006-04-19 10:26 爱你.福利 阅读(496) | 评论 (0)编辑 收藏
仅列出标题