当前位置:首页 » 服务器技术
开发技术指南» 文章正文
    引言: Page 2 of 4 Er
 

 

 ·php.ini 配置详细选项    »显示摘要«
    摘要: php.ini 或 php3.ini 是 php 在启动时会读取的配置文件。该文件的存放路径为 /usr/local/lib/。在 php 3.x 版的配置文件为 php3.ini;而在 php 4.x 版改为 php.ini。若 php 安装成服务器的模块,则在 web 服务器启动执行时会读取,之后就不再读取,因此改动配置的话要重新启动 web 服务器。若使用独立 php cgi 方式,则每次都读一次。 要看目前的系统配置,可以用phpinfo()......
 ·演练:在excel中拦截事件    »显示摘要«
    摘要:演练:在excel中拦截事件 ken getz mcw technologies september 2003 applies to: microsoft® visual studio® tools for the microsoft office system microsoft office excel 2003 microsoft visual studio .net 2003 概述:微软的visual ......


(转贴)Struts best practices 2
page 2 of 4

【相关文章:ASP.NET配置

error categorization 【扩展阅读:关注Solaris 10的10大新变化

【扩展信息:用JDOM实现数据库到XML的转换

problem

error handling becomes complex for an n-tiered application. in a browser-based application, the errors can be handled in the client layer using javascript and in the web tier or ejb (enterprise javabeans) tier using custom java methods. building an infrastructure for consistent error reporting proves more difficult than error handling. struts provides the actionmessages/actionerrorsclasses for maintaining a stack of error messages to be reported, which can be used with jsp tags like <html: error> to display these error messages to the user. the problem is reporting a different category/severity of the message in a different manner (like error, warning, or information). to do that, the following tasks are required:

register the errors under the appropriate category identify these messages and show them consistently

struts best practice

struts´ actionerrors class comes in handy in resolving the first issue of stacking messages of different categories. to display the error messages of different categories, define these categories such as fatal, error, warning, or info, in an interface. then, in the action or form-bean class, you can use:

errors.add("fatal", new actionerror("....")); or


...   下一页
 ·top 10 reasons to use smart client     »显示摘要«
    摘要:top 10 reasons for developers to create smart clients built to take advantage of new xml technologies, smart client software delivers the best of both worlds, combining the reach of the internet with the power of local computing ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE