blogjava-凯发k8网页登录

blogjava-凯发k8网页登录http://www.blogjava.net/dreamstone/category/24600.html开发出高质量的系统zh-cnthu, 02 aug 2007 17:21:43 gmtthu, 02 aug 2007 17:21:43 gmt60webwork iterator 遍历双重listhttp://www.blogjava.net/dreamstone/archive/2007/07/30/133431.htmldreamstonedreamstonemon, 30 jul 2007 13:07:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/07/30/133431.htmlhttp://www.blogjava.net/dreamstone/comments/133431.htmlhttp://www.blogjava.net/dreamstone/archive/2007/07/30/133431.html#feedback2http://www.blogjava.net/dreamstone/comments/commentrss/133431.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/133431.html一直没有找到很好的做法,偶尔从朋友得到答案,下边是个例子:
构造一个双层列表:
outlist = new arraylist();
 
inlist
= new arraylist();
inlist.add(
new element("1","a"));
inlist.add(
new element("2","b"));
outlist.add(inlist);
 
inlist
= new arraylist();
inlist.add(
new element("3","c"));
inlist.add(
new element("4","d"));
outlist.add(inlist);

遍历:
<ww:iterator value="outlist">
    
<ww:iterator value="top">
          
<ww: property value="key"/>,<ww: property value="value"/>
    
ww:iterator>
ww:iterator>


注意:关键点就一个top,意思是取栈顶的元素.

dreamstone 2007-07-30 21:07
]]>
struts-menu(list-menu样式和treemenu样式)http://www.blogjava.net/dreamstone/archive/2007/05/27/120311.htmldreamstonedreamstonesun, 27 may 2007 09:18:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/05/27/120311.htmlhttp://www.blogjava.net/dreamstone/comments/120311.htmlhttp://www.blogjava.net/dreamstone/archive/2007/05/27/120311.html#feedback0http://www.blogjava.net/dreamstone/comments/commentrss/120311.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/120311.html阅读全文

dreamstone 2007-05-27 17:18
]]>
struts-menu(tablemenu样式)http://www.blogjava.net/dreamstone/archive/2007/05/27/120309.htmldreamstonedreamstonesun, 27 may 2007 09:09:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/05/27/120309.htmlhttp://www.blogjava.net/dreamstone/comments/120309.htmlhttp://www.blogjava.net/dreamstone/archive/2007/05/27/120309.html#feedback0http://www.blogjava.net/dreamstone/comments/commentrss/120309.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/120309.html阅读全文

dreamstone 2007-05-27 17:09
]]>
struts-menu使用教程http://www.blogjava.net/dreamstone/archive/2007/05/27/120308.htmldreamstonedreamstonesun, 27 may 2007 08:59:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/05/27/120308.htmlhttp://www.blogjava.net/dreamstone/comments/120308.htmlhttp://www.blogjava.net/dreamstone/archive/2007/05/27/120308.html#feedback1http://www.blogjava.net/dreamstone/comments/commentrss/120308.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/120308.html阅读全文

dreamstone 2007-05-27 16:59
]]>
一种产生socket write error的原因(sitemesh 相关)http://www.blogjava.net/dreamstone/archive/2007/05/18/118340.htmldreamstonedreamstonefri, 18 may 2007 06:04:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/05/18/118340.htmlhttp://www.blogjava.net/dreamstone/comments/118340.htmlhttp://www.blogjava.net/dreamstone/archive/2007/05/18/118340.html#feedback0http://www.blogjava.net/dreamstone/comments/commentrss/118340.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/118340.html阅读全文

dreamstone 2007-05-18 14:04 发表评论
]]>
webwork的强大的验证器http://www.blogjava.net/dreamstone/archive/2007/02/08/98680.htmldreamstonedreamstonethu, 08 feb 2007 02:35:00 gmthttp://www.blogjava.net/dreamstone/archive/2007/02/08/98680.htmlhttp://www.blogjava.net/dreamstone/comments/98680.htmlhttp://www.blogjava.net/dreamstone/archive/2007/02/08/98680.html#feedback1http://www.blogjava.net/dreamstone/comments/commentrss/98680.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/98680.html   ...  

dreamstone 2007-02-08 10:35
]]>
解决webwork utf-8 乱码问题http://www.blogjava.net/dreamstone/archive/2006/12/08/86403.htmldreamstonedreamstonefri, 08 dec 2006 09:00:00 gmthttp://www.blogjava.net/dreamstone/archive/2006/12/08/86403.htmlhttp://www.blogjava.net/dreamstone/comments/86403.htmlhttp://www.blogjava.net/dreamstone/archive/2006/12/08/86403.html#feedback2http://www.blogjava.net/dreamstone/comments/commentrss/86403.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/86403.html解决webwork utf-8 乱码问题
起因:使用webwork spring开发,出现提交数据乱码。

1,首先尝试修改webwork配制文件webwork.properties
webwork.locale=zh_cn
webwork.i18n.encoding=utf-8
没有解决问题
2,再次尝试加入filter
 
  setcharacterencoding
  org.springframework.web.filter.characterencodingfilter
  
   encoding
   utf-8
  

 

 
  setcharacterencoding
  *.jsp
 

 
  setcharacterencoding
  *.action
 

还是没有解决问题。
3,尝试更改提交方式 ,页面上加上  method="post"
问题解决。但是新问题出现,url中出现的中文依然是乱码
更改tomcat server.xml文件,在中加入uriencoding="utf-8"问题解决,
但有更好的一种凯发天生赢家一触即发官网的解决方案。就是用usebodyencodingforuri="true"代替uriencoding="utf-8"
这样tomcat会根据页面的编码去处理



dreamstone 2006-12-08 17:00
]]>
优雅的解决web布局的问题 -- sitemesh的使用http://www.blogjava.net/dreamstone/archive/2006/12/05/85624.htmldreamstonedreamstonetue, 05 dec 2006 09:17:00 gmthttp://www.blogjava.net/dreamstone/archive/2006/12/05/85624.htmlhttp://www.blogjava.net/dreamstone/comments/85624.htmlhttp://www.blogjava.net/dreamstone/archive/2006/12/05/85624.html#feedback1http://www.blogjava.net/dreamstone/comments/commentrss/85624.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/85624.htmlwebwork的开发团队opensymphony提供了一种优雅的解决页面布局的方法sitemesh。
sitemesh应用decorator模式,用filter截取request和response,把页面组件head,content,banner
结合为一个完整的视图。通常我们都是用include标签在每个jsp页面中来不断的包含各种header,
stylesheet, scripts and footer,现在,在sitemesh的帮助下,我们可以开心的删掉他们了

下边是创建一个简单实例的步骤:
1,新建一个标准的web工程叫sitemesh
在webroot下新建一个index.jsp,内容如下

1 <% @ page contenttype = " text/html; charset=utf-8 " %>
2 this  is index.jsp.
3 it ' s a simple page 

接着在webroot下新建几个目录
style2
login
shared
在login下建立目录style3
然後把index.jsp分别复制到style2,login/style3,shared下
现在访问下边的链接:




得到的结果是一样的,那我们如何让这四个相同的index.jsp有不同的样式呢。除了每个里边加入include
还有个解决办法,就是sitemesh
2,在opensymphony.sourceforge.net下载sitemesh.jar ,sitemesh-decorator.tld,sitemesh-page.tld
三个文件。
复制sitemesh.jar到web-inf/lib下,
复制sitemesh-decorator.tld,sitemesh-page.tld到web-inf下
把下边这部分加入web.xml
------------------------------------------------------------------------------

  sitemesh
  com.opensymphony.module.sitemesh.filter.pagefilter


  sitemesh
  /*


  sitemesh-decorator
  /web-inf/sitemesh-decorator.tld


  sitemesh-page
  /web-inf/sitemesh-page.tld

--------------------------------------------------------------------------------
在web-inf下建立一个decorators.xml,内容如下
excludes代表不使用的部分
其它三个是匹配url,使用style
--------------------------------------------------------------------------

   
        /shared/*   
   

   
        /*
   

   
        /style2/*
   

   
   
        /*/style3/*
   


--------------------------------------------------------------------------
在webroot下新建一个目录decorators
然後在下边建立三个jsp文件,内容如下
------------------------------------------------------------------
<%@ page contenttype="text/html; charset=utf-8"%>
<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>

 
    <decorator:title default="装饰器页面..." />
   
 
 
   

this is style2's header


   

   
   

   

this is style1's footer


 

------------------------------------------------------------------

<%@ page contenttype="text/html; charset=utf-8"%>
<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>


 
    <decorator:title default="装饰器页面..." />
   
 
 
   

this is style2's header


   

   
   

   

this is style2's footer


 

------------------------------------------------------------------
<%@ page contenttype="text/html; charset=utf-8"%>
<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>


 
    <decorator:title default="装饰器页面..." />
   
 
 
   

this is style3's header


   

   
   

   

this is style3's footer


 

------------------------------------------------------------------
再次访问




看到变化了吧。这只是个简单的展示,仔细思考一下你的需求,你能作出更好的布局方式。
sitemesh真不错。重要是学习简单20分种就搞定了


dreamstone 2006-12-05 17:17
]]>
[struts 2.0]struts2的struts.properties配置文件详解http://www.blogjava.net/dreamstone/archive/2006/11/29/84410.htmldreamstonedreamstonewed, 29 nov 2006 11:12:00 gmthttp://www.blogjava.net/dreamstone/archive/2006/11/29/84410.htmlhttp://www.blogjava.net/dreamstone/comments/84410.htmlhttp://www.blogjava.net/dreamstone/archive/2006/11/29/84410.html#feedback0http://www.blogjava.net/dreamstone/comments/commentrss/84410.htmlhttp://www.blogjava.net/dreamstone/services/trackbacks/84410.html转载自:
struts.action.extension
          the url extension to use to determine if the request is meant for a struts action 
           用url扩展名来确定是否这个请求是被用作struts action,其实也就是设置 action的后缀,例如login.do的'do'字。

struts.configuration
          the org.apache.struts2.config.configuration implementation class
            org.apache.struts2.config.configuration接口名

struts.configuration.files
          a list of configuration files automatically loaded by struts 
           struts自动加载的一个配置文件列表

struts.configuration.xml.reload
          whether to reload the xml configuration or not
           是否加载xml配置(true,false)

struts.continuations.package
           the package containing actions that use rife continuations
           含有actions的完整连续的package名称

struts.custom.i18n.resources
          location of additional localization properties files to load 
           加载附加的国际化属性文件(不包含.properties后缀)

struts.custom.properties
          location of additional configuration properties files to load
           加载附加的配置文件的位置


struts.devmode
          whether struts is in development mode or not
           是否为struts开发模式

struts.dispatcher.parametersworkaround
          whether to use a servlet request parameter workaround necessary for some versions of weblogic
            (某些版本的weblogic专用)是否使用一个servlet请求参数工作区(parametersworkaround)

struts.enable.dynamicmethodinvocation
          allows one to disable dynamic method invocation from the url
            允许动态方法调用

struts.freemarker.manager.classname
          the org.apache.struts2.views.freemarker.freemarkermanager implementation class 
           org.apache.struts2.views.freemarker.freemarkermanager接口名

struts.i18n.encoding
          the encoding to use for localization messages
           国际化信息内码

struts.i18n.reload
          whether the localization messages should automatically be reloaded
           是否国际化信息自动加载

struts.locale
          the default locale for the struts application
           默认的国际化地区信息

struts.mapper.class
          the org.apache.struts2.dispatcher.mapper.actionmapper implementation class
            org.apache.struts2.dispatcher.mapper.actionmapper接口

struts.multipart.maxsize
          the maximize size of a multipart request (file upload)
           multipart请求信息的最大尺寸(文件上传用)

struts.multipart.parser
          the org.apache.struts2.dispatcher.multipart.multipartrequest parser implementation for a multipart request (file upload) 
          专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart.multipartrequest解析器接口(文件上传用)


struts.multipart.savedir
          the directory to use for storing uploaded files 
           设置存储上传文件的目录夹

struts.objectfactory
          the com.opensymphony.xwork2.objectfactory implementation class
           com.opensymphony.xwork2.objectfactory接口(spring)

struts.objectfactory.spring.autowire
          whether spring should autowire or not
           是否自动绑定spring

struts.objectfactory.spring.useclasscache
          whether spring should use its class cache or not
           是否spring应该使用自身的cache

struts.objecttypedeterminer
          the com.opensymphony.xwork2.util.objecttypedeterminer implementation class
            com.opensymphony.xwork2.util.objecttypedeterminer接口

struts.serve.static.browsercache
          if static content served by the struts filter should set browser caching header properties or not 
           是否struts过滤器中提供的静态内容应该被浏览器缓存在头部属性中

struts.serve.static
          whether the struts filter should serve static content or not 
           是否struts过滤器应该提供静态内容

struts.tag.altsyntax
          whether to use the alterative syntax for the tags or not 
           是否可以用替代的语法替代tags

struts.ui.templatedir
          the directory containing ui templates
           ui templates的目录夹

struts.ui.theme
          the default ui template theme
           默认的ui template主题

struts.url.http.port
          the http port used by struts urls
           设置http端口

struts.url.https.port
          the https port used by struts urls 
           设置https端口

struts.url.includeparams
          the default includeparams method to generate struts urls 
          在url中产生 默认的includeparams

struts.velocity.configfile
          the velocity configuration file path
           velocity配置文件路径

struts.velocity.contexts
          list of velocity context names
           velocity的context列表


struts.velocity.manager.classname
          org.apache.struts2.views.velocity.velocitymanager implementation class
           org.apache.struts2.views.velocity.velocitymanager接口名

struts.velocity.toolboxlocation
          the location of the velocity toolbox
           velocity工具盒的位置
struts.xslt.nocache
          whether or not xslt templates should not be cached
           是否xslt模版应该被缓存 



dreamstone 2006-11-29 19:12
]]>
网站地图